L
LuCk
I cant seem to get any string type variables to work....I even put this
simple program together:
----------------------------------------------------------
#include <iostream.h>
#include <string.h>
int main() {
string Name;
Name = "Carl";
cout << Name << endl;
return 0;
}
----------------------------------------------------------
To test if the problem is the strings and it gives me the following errors:
--------------------Configuration: Test - Win32 Debug--------------------
Compiling...
Test.cpp
c:\documents and settings\owner\my documents\c++\test.cpp(5) : error C2065:
'string' : undeclared identifier
c:\documents and settings\owner\my documents\c++\test.cpp(5) : error C2146:
syntax error : missing ';' before identifier 'Name'
c:\documents and settings\owner\my documents\c++\test.cpp(5) : error C2065:
'Name' : undeclared identifier
c:\documents and settings\owner\my documents\c++\test.cpp(6) : error C2440:
'=' : cannot convert from 'char [5]' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or
function-style cast
Error executing cl.exe.
Test.obj - 4 error(s), 0 warning(s)
Does anyone know whats going on and if its my string.h header file...can
someone give me a link to download it please.
Thankyou.
Regards,
Carl
simple program together:
----------------------------------------------------------
#include <iostream.h>
#include <string.h>
int main() {
string Name;
Name = "Carl";
cout << Name << endl;
return 0;
}
----------------------------------------------------------
To test if the problem is the strings and it gives me the following errors:
--------------------Configuration: Test - Win32 Debug--------------------
Compiling...
Test.cpp
c:\documents and settings\owner\my documents\c++\test.cpp(5) : error C2065:
'string' : undeclared identifier
c:\documents and settings\owner\my documents\c++\test.cpp(5) : error C2146:
syntax error : missing ';' before identifier 'Name'
c:\documents and settings\owner\my documents\c++\test.cpp(5) : error C2065:
'Name' : undeclared identifier
c:\documents and settings\owner\my documents\c++\test.cpp(6) : error C2440:
'=' : cannot convert from 'char [5]' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or
function-style cast
Error executing cl.exe.
Test.obj - 4 error(s), 0 warning(s)
Does anyone know whats going on and if its my string.h header file...can
someone give me a link to download it please.
Thankyou.
Regards,
Carl