About atom C++ string

Asked 2 years ago, Updated 2 years ago, 85 views

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.

Run Results Enter a description of the image here

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;
}

c++ vscode atom-editor

2022-09-30 13:48

1 Answers

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.


2022-09-30 13:48

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.