Her er koden:
Og her er errorene:
1>cusers\xxx\documents\visual studio 2008\projects\domain\join.cpp(21) : error C2296: '<<' : illegal, left operand has type 'const char [17]'
1>cusers\xxx\documents\visual studio 2008\projects\domain\join.cpp(21) : error C2297: '<<' : illegal, right operand has type 'char [20]'
Save my day anyone?
Kode
#include <iostream> #include <string> using namespace std; int main() { char domain [20]; char user [20]; string passwd; cout << "Type the domain"; cin >> domain; cout << "Type in your admin username"; cin >> user; cout << "Type in the password"; cin >> passwd; cout << ("NETDOM //Domain:" << domain << "//user:" << user << "//password:" << passwd << "MEMBER MYCOMPUTER //JOINDOMAIN"); return 0; }
1>cusers\xxx\documents\visual studio 2008\projects\domain\join.cpp(21) : error C2296: '<<' : illegal, left operand has type 'const char [17]'
1>cusers\xxx\documents\visual studio 2008\projects\domain\join.cpp(21) : error C2297: '<<' : illegal, right operand has type 'char [20]'
Save my day anyone?