• Create Account

### #ActualMoe091

Posted 30 October 2012 - 04:17 PM

I can tell this is gonna be fun already lol, it is surprisingly hard to google how to use c++ without a compiler. I tried winging it, I wrote a hello world in notepad and saved it as hello.cpp, navigated to the directory in command prompt and typed the command i finally found on google (c++ hello.cpp -o hello.exe) and I get an error saying 'c++' isn't a recognized command, so I'm assuming I have some more setup to do with my compiler(using the c++ compiler i downloaded with the microsoft sdk) in order for it to recognize the command. Can anyone help me or tell me what to google, I'm having trouble getting results related to my problem, just a bunch of stackexchanges about much more complicated questions than mine, ill be searching in the meantime.

EDIT: forget all my edits, I found the path to the VC compiler by running the VC command prompt, it's the default path for it.

Thanks again for all the help everybody

I like g++, but I am not sure how people normally use it under Windows (I have used it under Linux, Solaris and Mac OS/X).

* Don't do your own dynamic memory allocation: Use local variables and standard containers instead.
* If you really need dynamic memory allocation, use a smart pointer like std::shared_ptr.

If you feel tempted to use new' (which I know is a common tendency in Java programmers), resist your urge. You probably don't need it. If you can't figure out how to avoid it, post here and we'll probably be able to help.

thanks, I probably would have been using 'new' like crazy haha. These are the kind of tips I need

### #3Moe091

Posted 30 October 2012 - 04:12 PM

I can tell this is gonna be fun already lol, it is surprisingly hard to google how to use c++ without a compiler. I tried winging it, I wrote a hello world in notepad and saved it as hello.cpp, navigated to the directory in command prompt and typed the command i finally found on google (c++ hello.cpp -o hello.exe) and I get an error saying 'c++' isn't a recognized command, so I'm assuming I have some more setup to do with my compiler(using the c++ compiler i downloaded with the microsoft sdk) in order for it to recognize the command. Can anyone help me or tell me what to google, I'm having trouble getting results related to my problem, just a bunch of stackexchanges about much more complicated questions than mine, ill be searching in the meantime.

EDIT: I'm just installing the mingw compiler because I remember it being easy to set up, and it's seriously that hard for me to google it(clearly I don't understand how this works enough to know what to search for, not tryin to blame the search engine), is there anything wrong with using this compiler for now if i plan on switching to the microsoft one later? are there any significant differences at all?

EDIT 2: alright I set the path variable to the mingw compiler and solved the problem above, so I'm tryin to find the path to the visual c++ compiler now. might as well use it now that I figured out how to set it up

Thanks again for all the help everybody

I like g++, but I am not sure how people normally use it under Windows (I have used it under Linux, Solaris and Mac OS/X).

* Don't do your own dynamic memory allocation: Use local variables and standard containers instead.
* If you really need dynamic memory allocation, use a smart pointer like std::shared_ptr.

If you feel tempted to use new' (which I know is a common tendency in Java programmers), resist your urge. You probably don't need it. If you can't figure out how to avoid it, post here and we'll probably be able to help.

thanks, I probably would have been using 'new' like crazy haha. These are the kind of tips I need

### #2Moe091

Posted 30 October 2012 - 03:38 PM

I can tell this is gonna be fun already lol, it is surprisingly hard to google how to use c++ without a compiler. I tried winging it, I wrote a hello world in notepad and saved it as hello.cpp, navigated to the directory in command prompt and typed the command i finally found on google (c++ hello.cpp -o hello.exe) and I get an error saying 'c++' isn't a recognized command, so I'm assuming I have some more setup to do with my compiler(using the c++ compiler i downloaded with the microsoft sdk) in order for it to recognize the command. Can anyone help me or tell me what to google, I'm having trouble getting results related to my problem, just a bunch of stackexchanges about much more complicated questions than mine, ill be searching in the meantime.

EDIT: I'm just installing the mingw compiler because I remember it being easy to set up, and it's seriously that hard for me to google it(clearly I don't understand how this works enough to know what to search for, not tryin to blame the search engine), is there anything wrong with using this compiler for now if i plan on switching to the microsoft one later? are there any significant differences at all?

Thanks again for all the help everybody

I like g++, but I am not sure how people normally use it under Windows (I have used it under Linux, Solaris and Mac OS/X).

* Don't do your own dynamic memory allocation: Use local variables and standard containers instead.
* If you really need dynamic memory allocation, use a smart pointer like std::shared_ptr.

If you feel tempted to use new' (which I know is a common tendency in Java programmers), resist your urge. You probably don't need it. If you can't figure out how to avoid it, post here and we'll probably be able to help.

thanks, I probably would have been using 'new' like crazy haha. These are the kind of tips I need

### #1Moe091

Posted 30 October 2012 - 03:31 PM

I can tell this is gonna be fun already lol, it is surprisingly hard to google how to use c++ without a compiler. I tried winging it, I wrote a hello world in notepad and saved it as hello.cpp, navigated to the directory in command prompt and typed the command i finally found on google (c++ hello.cpp -o hello.exe) and I get an error saying 'c++' isn't a recognized command, so I'm assuming I have some more setup to do with my compiler(using the c++ compiler i downloaded with the microsoft sdk) in order for it to recognize the command. Can anyone help me or tell me what to google, I'm having trouble getting results related to my problem, just a bunch of stackexchanges about much more complicated questions than mine, ill be searching in the meantime.

Thanks again for all the help everybody

I like g++, but I am not sure how people normally use it under Windows (I have used it under Linux, Solaris and Mac OS/X).