well i tried redoing it the way you said this is the code
Code:
#include<iostream.h>
#include<string.h>
//declares as type int
string First,Middle,Last
//main program starts
int main ()
{
string first,middle,last;
cout << "enter your name: \n" ;
cout << "\ First: " ;
cin >> First;
cout << "\ Middle: " ;
cin >> Middle ;
cout << "\ Last: " ;
cin >> Last ;
cout << " welcome," "<<First <<Middle <<Last \n" ;
//main program end
return 0;
}
i compiled it with dev C++ 4.9.9.2
and this is the message i got when i compiled it
Compiler: Default compiler
Executing g++.exe...
g++.exe "F:\Apps\Dev-Cpp\COMPILED\name input.cpp" -o "F:\Apps\Dev-Cpp\COMPILED\name input.exe" -g3 -I"F:\Apps\Dev-Cpp\lib\gcc\mingw32\3.4.2\include" -I"F:\Apps\Dev-Cpp\include\c++\3.4.2\backward" -I"F:\Apps\Dev-Cpp\include\c++\3.4.2\mingw32" -I"F:\Apps\Dev-Cpp\include\c++\3.4.2" -I"F:\Apps\Dev-Cpp\include" -L"F:\Apps\Dev-Cpp\lib" -g3
In file included from F:/Apps/Dev-Cpp/include/c++/3.4.2/backward/iostream.h:31,
from F:\Apps\Dev-Cpp\COMPILED\name input.cpp:1:
F:/Apps/Dev-Cpp/include/c++/3.4.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or
<iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
F:\Apps\Dev-Cpp\COMPILED\name input.cpp:5: error: `string' does not name a type
F:\Apps\Dev-Cpp\COMPILED\name input.cpp:12:9: warning:
unknown escape sequence: '\040'
F:\Apps\Dev-Cpp\COMPILED\name input.cpp:14:9: warning: unknown escape sequence: '\040'
F:\Apps\Dev-Cpp\COMPILED\name input.cpp:16:9: warning: unknown escape sequence: '\040'
Execution terminated