when i use char or char*, visual studio 2012(11) only couts last character such as:
#include <iostream>
#include <string>
int main(){
using namespace std;
char chName = 'Alex';
cout<<chName;
}
It displays only "x". it is correct is i use
string strName = "Alex"
but in those function which have parameter as a char, string can not be passed on as argument. in this case, VS compiler says that strings cant be converted into int.
also tell me what is difference between char and char*.
I am a PHP developer and C++ is so confusing. Please help me.