I created the source code for Atom (also in vscode) C++ (shown below) and when I run it, I can't use the string system. Could someone tell me how to improve it?
The compiler is MinGw.
Source Code
#include<iostream>
# include <string>
using namespace std;
int main(void){
US>string first_name;
US>string last_name;
US>string full_name;
first_name = "Steve";
last_name = "O";
full_name = first_name + last_name;
cout<<full_name<<endl;
return 0;
}
Below is a sample code that works as expected.
#include<iostream>
using namespace std;
int main(void){
inta,b;
cin>>a>>b;
if(a< b ){
cout<<"a<b"<<endl;
}
else if(a>b){
cout<<"a>b"<<endl;
}
else{
cout<<"a==b"<<endl;
}
return 0;
}
I'm sorry.
Resolved, I'm sorry to say that the Mingw installation was incorrectly 64bit and 32bit.
It was cured by reintroduction.
I'm really sorry.
Thank you for your reply.
© 2024 OneMinuteCode. All rights reserved.