Thread: Could use some help with Geany
i'm trying super basic hello world code in c++. typed in how walk-through showed me, error every time click build button.
g++ -wall -o "untitled" "untitled.cmm" (in directory: /home/hunter)
compilation failed.
untitled.cmm: file not recognized: file format not recognized
collect2: ld returned 1 exit status
have no idea **** i'm doing
is have typed in.code:#include <iostream> using namespace std; int main() { cout << "hello world!"; getchar(); return 0; }
first, rename file untitled.cpp.
secondly, use of getchar() incorrect. need #include cstdio , declare first.code:#include <iostream> #include <cstdio> using namespace std; int main() { char c; cout << "hello world!"; c=getchar(); return 0; }
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] Could use some help with Geany
Ubuntu
Comments
Post a Comment