I must be typing in the wrong path or something, because every time I do it I get a > as a result and nothing I do from that point on makes any difference.
here you go. You will notice I added a line "using namespace std;" This tell the compiler what "cout" "cin" "endl" and others do.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
//include this file for cout
#include <iostream.h>
using name space std;
int main() {
//print out the text string, "Hello, World!"
cout << "Hello, World!" << endl;
return 0;
}
Also you might want to replace return 0; with cin.get();. That will tell the program to wait for you to press the return key b4 going on.
I know its bad form to just give the answer. Sometimes its just best to see a problem corrected. It it can be a fast and easy way to learn learn how something should be done.
igneousquill, I have some c++ books I can send you a link to. Send me a PM if you want them
I really appreciate the attempts to help. I really think the problem is when I'm trying to compile. The file exists as hello.C (I'm in Linux). I'm taking the path from the location I can see when I look for the file. I start off in the terminal at the prompt with g++ but after I put everything in it just goes to a > prompt and does nothing more. I'm clueless.
I've been playing around with Python for a couple of weeks now and wanted to start getting familiar with C++, but never encountered anything like this. Stumped.
Okay, I'm going to feel bad if this is the problem, but how should the file name end? I'm working in Ubuntu Linux and assumed .C would be the correct ending, but on another forum I read about someone using .cpp, which I thought was only for Windows. I'm at work using a Mac right now so I can't test it.