Hi! I was wondering if anyone could tell me what I'm doing wrong with this program. Any help would be greatly appreciated!
// my first program in C++
#include <iostream>
using namespace std;
int main () {
* *cout << "Hello World!";
* *return 0;
}
Last login: Mon Mar 21 01:40:48 on console
Welcome to Darwin!
Chuck-Gishs-Computer:~ chuck$ cd /developer
Chuck-Gishs-Computer:/developer chuck$ g++ myprog.cpp
myprog.cpp:1: error: parse error before `{' token
myprog.cpp:1: error: stray '\' in program
myprog.cpp:1: error: stray '\' in program
myprog.cpp:1: error: stray '\' in program
myprog.cpp:1: error: stray '\' in program
myprog.cpp:2: error: stray '\' in program
myprog.cpp:2: error: stray '\' in program
myprog.cpp:2: error: stray '\' in program
myprog.cpp:2: error: stray '\' in program
myprog.cpp:2: error: stray '\' in program
myprog.cpp:2: error: stray '\' in program
myprog.cpp:2: error: stray '\' in program
myprog.cpp:2: error: parse error before `Courier'
myprog.cpp:3: error: stray '\' in program
myprog.cpp:3: error: stray '\' in program
myprog.cpp:3: error: stray '\' in program
myprog.cpp:3: error: stray '\' in program
myprog.cpp:3: error: parse error before `;' token
myprog.cpp:3: error: stray '\' in program
myprog.cpp:3: error: stray '\' in program
myprog.cpp:3: error: stray '\' in program
myprog.cpp:3: error: parse error before `;' token
myprog.cpp:4: error: stray '\' in program
myprog.cpp:4: error: stray '\' in program
myprog.cpp:4: error: stray '\' in program
myprog.cpp:4: error: stray '\' in program
myprog.cpp:4: error: parse error before `viewh9000'
myprog.cpp:4: error: stray '\' in program
myprog.cpp:5: error: stray '\' in program
myprog.cpp:5: error: stray '\' in program
myprog.cpp:5: error: stray '\' in program
myprog.cpp:5: error: stray '\' in program
myprog.cpp:5: error: stray '\' in program
myprog.cpp:5: error: stray '\' in program
myprog.cpp:5: error: stray '\' in program
myprog.cpp:5: error: stray '\' in program
myprog.cpp:5: error: stray '\' in program
myprog.cpp:5: error: stray '\' in program
myprog.cpp:5: error: stray '\' in program
myprog.cpp:5: error: stray '\' in program
myprog.cpp:5: error: stray '\' in program
myprog.cpp:5: error: stray '\' in program
myprog.cpp:5: error: stray '\' in program
myprog.cpp:7: error: stray '\' in program
myprog.cpp:7: error: stray '\' in program
myprog.cpp:7: error: stray '\' in program
myprog.cpp:15: error: stray '\' in program
myprog.cpp:15: error: stray '\' in program
myprog.cpp:15: error: stray '\' in program
myprog.cpp:16: error: stray '\' in program
myprog.cpp:16: error: stray '\' in program
myprog.cpp:16: error: stray '\' in program
myprog.cpp:16:14: missing terminating " character
myprog.cpp:16:14: warning: unknown escape sequence '\}'
Chuck-Gishs-Computer:/developer chuck$
// my first program in C++
#include <iostream>
using namespace std;
int main () {
* *cout << "Hello World!";
* *return 0;
}
Last login: Mon Mar 21 01:40:48 on console
Welcome to Darwin!
Chuck-Gishs-Computer:~ chuck$ cd /developer
Chuck-Gishs-Computer:/developer chuck$ g++ myprog.cpp
myprog.cpp:1: error: parse error before `{' token
myprog.cpp:1: error: stray '\' in program
myprog.cpp:1: error: stray '\' in program
myprog.cpp:1: error: stray '\' in program
myprog.cpp:1: error: stray '\' in program
myprog.cpp:2: error: stray '\' in program
myprog.cpp:2: error: stray '\' in program
myprog.cpp:2: error: stray '\' in program
myprog.cpp:2: error: stray '\' in program
myprog.cpp:2: error: stray '\' in program
myprog.cpp:2: error: stray '\' in program
myprog.cpp:2: error: stray '\' in program
myprog.cpp:2: error: parse error before `Courier'
myprog.cpp:3: error: stray '\' in program
myprog.cpp:3: error: stray '\' in program
myprog.cpp:3: error: stray '\' in program
myprog.cpp:3: error: stray '\' in program
myprog.cpp:3: error: parse error before `;' token
myprog.cpp:3: error: stray '\' in program
myprog.cpp:3: error: stray '\' in program
myprog.cpp:3: error: stray '\' in program
myprog.cpp:3: error: parse error before `;' token
myprog.cpp:4: error: stray '\' in program
myprog.cpp:4: error: stray '\' in program
myprog.cpp:4: error: stray '\' in program
myprog.cpp:4: error: stray '\' in program
myprog.cpp:4: error: parse error before `viewh9000'
myprog.cpp:4: error: stray '\' in program
myprog.cpp:5: error: stray '\' in program
myprog.cpp:5: error: stray '\' in program
myprog.cpp:5: error: stray '\' in program
myprog.cpp:5: error: stray '\' in program
myprog.cpp:5: error: stray '\' in program
myprog.cpp:5: error: stray '\' in program
myprog.cpp:5: error: stray '\' in program
myprog.cpp:5: error: stray '\' in program
myprog.cpp:5: error: stray '\' in program
myprog.cpp:5: error: stray '\' in program
myprog.cpp:5: error: stray '\' in program
myprog.cpp:5: error: stray '\' in program
myprog.cpp:5: error: stray '\' in program
myprog.cpp:5: error: stray '\' in program
myprog.cpp:5: error: stray '\' in program
myprog.cpp:7: error: stray '\' in program
myprog.cpp:7: error: stray '\' in program
myprog.cpp:7: error: stray '\' in program
myprog.cpp:15: error: stray '\' in program
myprog.cpp:15: error: stray '\' in program
myprog.cpp:15: error: stray '\' in program
myprog.cpp:16: error: stray '\' in program
myprog.cpp:16: error: stray '\' in program
myprog.cpp:16: error: stray '\' in program
myprog.cpp:16:14: missing terminating " character
myprog.cpp:16:14: warning: unknown escape sequence '\}'
Chuck-Gishs-Computer:/developer chuck$