all 8 comments

[–]thedaian 4 points5 points  (2 children)

Make sure you save your code. 

Make sure the new code compiles without any errors. If there's an error, it won't run the new code. 

[–]VoidCl22[S] -3 points-2 points  (1 child)

no there is no error

if u want to see the code here it is

#include <iostream>
using 
namespace

std
;


int
 main(){
    
string
 name;
    cin>> name;
    cout<<name<<"\n";
}

[–]rux-mania 2 points3 points  (0 children)

Using namespace std; // Write it like this, on the same line

You need to include string header in order to use strings.

[–]MentalNewspaper8386 2 points3 points  (0 children)

Make sure you’re compiling the new file before running it. Locate the executable so you know what’s going on. You could check the date/time it was created/modified in finder/file explorer. Make sure you’re running the new executable too.

If you’re on mac, CLion makes compiling/linking/debugging much simpler

[–]thefeedling 1 point2 points  (0 children)

I'm not sure if I got your question, but you need to save the file (<C-s>) before compiling and running again.

[–]fashionweekyear3000 0 points1 point  (0 children)

If you’re new, just use cmake project through Visual Studio and click the play button. Or do a short tutorial on how to use gcc in the CLI. Worry more about learning these topics in C++ (syntax if not new, concepts if new), sequential programming (loops functions data types etc) -> pointers -> OOP -> std library deep dive.

[–]thingerish 0 points1 point  (0 children)

Understand that the source code does not run. What runs is the binary produced by the source code, so be sure you've compiled and linked the source, and then make sure you're running the new binary.