The13thbrother
March 8th, 2009, 01:34 AM
Hey, I'm very new to Ubuntu and C++. Having only installed Ubuntu yesterday and tried out c++ about 10 minutes ago. I installed g++ to make my programs work and when i try to run it using terminal i type in this:
"g++ hello.cpp -o hello" (no quotes)
i get this:
"g++: hello.cpp: No such file or directory
g++: no input files"
here is my program:
//include this for cout
#include <iostream.h>
int main() {
//print out the text string, "Hello, World!"
cout << "Hello, World!" << endl;
return 0;
}
and i am saving to desktop
am i typing something wrong, am i saving wrong? do i need to save to a g++ folder and if i do, how?
thanks for your help!
"g++ hello.cpp -o hello" (no quotes)
i get this:
"g++: hello.cpp: No such file or directory
g++: no input files"
here is my program:
//include this for cout
#include <iostream.h>
int main() {
//print out the text string, "Hello, World!"
cout << "Hello, World!" << endl;
return 0;
}
and i am saving to desktop
am i typing something wrong, am i saving wrong? do i need to save to a g++ folder and if i do, how?
thanks for your help!