I thought that the hello world program was just a matter of typing "print hello world" which was so easy and now I just figured out that you are spose to have it displayed on your screen...I cant get it to work ive been looking at forums for a good hour tinkering with my code a bit and still cant make it work which is derailing seeing as this is the first program you write :(
1 2 3 4 5 6
//Prints "Hello World!" to screen
#include "std_lib_facilities.h"
int main(){
std::cout << "hello World!" \n;
return 0;
}
Sorry for the confusion, I assumed you would get same error as me when you run it....
I get a few errors...syntax error, unexpected tolken, events not found, syntax error new unexpected tolken
Ill copy paste the return errors I get...Im fairly sure that its opening the file I downloaded I dont know if i should refer to it better maybe that will help...
1 2 3 4 5 6 7 8 9 10 11
Ahsans-MacBook-Pro:~ Onecent$ //Prints "Hello World!" to screen
-bash: !": event not found
Ahsans-MacBook-Pro:~ Onecent$ #include "std_lib_facilities.h"
Ahsans-MacBook-Pro:~ Onecent$ int main(){
-bash: syntax error near unexpected token `('
Ahsans-MacBook-Pro:~ Onecent$ std::cout << "hello World!" << \n;
-bash: !": event not found
Ahsans-MacBook-Pro:~ Onecent$ return 0;
-bash: return: can only `return' from a function or sourced script
Ahsans-MacBook-Pro:~ Onecent$ }
haha wow I look stupid im doing it wrong then...why cant I run it in my terminal, im writing code with sublime and copypasting it to terminal. I was led to believe I could do it all there...I have honestly just been doing python things like boolean values and lots of integers and greater than less than for loops, while loops, list, ect ect ect....
anyways I guess ill go look at tutorials see what I missed argg