Computer Science Canada Where do i start? |
Author: | apomb [ Fri Sep 24, 2004 2:16 pm ] |
Post subject: | Where do i start? |
I am starting C++, what would be the best place to start (code wise). Some of you might remember me from the Turing section, so i have some background in that and some java, although not extensive, i do know syntax and whatnot, and i hear C++ and java are similar in those respects. Anyway, is it better to start with pure syntax or just try to create from what i already know? please suggest - Compwiz |
Author: | Andy [ Fri Sep 24, 2004 2:30 pm ] |
Post subject: | |
for noobies, i suggest VC6... it does lack stability and consistancy, but it'll work... start by remaking the old progs u did in other languages in c++, just dont do any graphics cuz then u'd have to use MFC/Direct X/OGL and all three are quite painful for starters |
Author: | wtd [ Fri Sep 24, 2004 3:01 pm ] |
Post subject: | |
Absolutely not! Visual C++ 6 is one of the worst C++ compilers available in terms of standards compliance. There's nothing worse for a student than being shown valid code and getting errors when compiling it. GCC is available free and does a far better job than VC++6. As for "Where to start?"... I would start with basic concepts and then apply syntax to them. Do you understand:
|
Author: | Mazer [ Fri Sep 24, 2004 8:43 pm ] |
Post subject: | |
For just starting, you'd probably want an IDE to work with. Dev-C++ is pretty nice, and it saves you the trouble of buying/pirating MSVC++. And I believe it is possible to have it compile your programs with gcc (somebody please correct me if I'm wrong). |
Author: | omni [ Fri Sep 24, 2004 8:45 pm ] |
Post subject: | |
wow i understand 70-80% of that list. I feel like I'm making progress. ![]() |
Author: | rizzix [ Fri Sep 24, 2004 8:53 pm ] |
Post subject: | |
aha i just tried this out just 2 days ago and now its the only one i use (if i use an ide i.e): CBuilderX by Borland.. it comes with two choices for a compiler: borland's own and GNU's imho Dev-C++ is a buggy ide.. not stable at all.. i know its a work in progress and it has some cool features and stuff but its just not good enough for me. so i've decided to stick to CBuilderX. its pretty good.. and very much similar to their JBuilder IDE. but if ur really into c++ development and you know how to write your own makefiles.. then u should try out Eclipse with the CDT plugin |
Author: | wtd [ Fri Sep 24, 2004 9:06 pm ] |
Post subject: | |
Those new to programming would be best advised to avoid IDEs entirely for awhile. They tend to make things seem more complicated than they are, they make it difficult later on to distinguish features of the IDEand the language, and the command-line skills are good to have. |
Author: | wtd [ Fri Sep 24, 2004 9:51 pm ] |
Post subject: | |
omni wrote: wow i understand 70-80% of that list. I feel like I'm making progress.
![]() I wasn't even remotely done. ![]() |
Author: | Mazer [ Sat Sep 25, 2004 1:53 pm ] |
Post subject: | |
rizzix wrote: but if ur really into c++ development and you know how to write your own makefiles.. then u should try out Eclipse with the CDT plugin
Which reminds me... would anybody care to write up a tutorial on creating your own make files? I'll be needing that information in the near future and even now it'd be good to know. compwiz333: sorry if I'm hijacking your thread with this |
Author: | apomb [ Sat Sep 25, 2004 3:00 pm ] |
Post subject: | |
WOW... i almost dont have enough time right now to read all of this, but THANKS guys! i understand about 40% of what i read,which wasnt much right now, but i will definately look at all of that when i have time, anyway i cant believe all this help! Thank you, i will get started right away! ![]() Oh ya and at my school, i think they have VC++6 too ![]() ![]() ![]() |
Author: | Andy [ Sun Sep 26, 2004 6:18 pm ] |
Post subject: | |
w00t after u get the hang of it, learn getpixel ![]() |
Author: | wtd [ Sun Sep 26, 2004 9:57 pm ] |
Post subject: | |
CompWiz333 wrote: wtd: that was alot of info ...
You're welcome. ![]() CompWiz333 wrote: one big question that i have had since i heard of them are pointers ... what the **** are those!?
A pointer is a variable which stores the address of another variable, rather than the actual value of that variable. CompWiz333 wrote: Oh ya and at my school, i think they have VC++6 too
![]() ![]() ![]() Yes, Visual C++ 6.0 is absolutely horrible. Borland is decent, from what I hear, but it's a fairly niche compiler. GCC (the GNU Compiler Collection, which includes g++, their C++ compiler) is your best bet. It's widely available on Unix, Linux, Windows, Mac, etc. |
Author: | apomb [ Sun Sep 26, 2004 11:25 pm ] |
Post subject: | |
wtd wrote: A pointer is a variable which stores the address of another variable, rather than the actual value of that variable.
oooh!!! thats kinda kool. i can get used to that! started downloading the borland one ... first one i found! (finished tomorrow!) stupid 56k ... dont laugh, i offered to pay for highspeed but my parents are against the furthering of my knowledge haha |
Author: | wtd [ Mon Sep 27, 2004 3:17 am ] | ||||||||||
Post subject: | |||||||||||
CompWiz333 wrote: wtd wrote: A pointer is a variable which stores the address of another variable, rather than the actual value of that variable.
oooh!!! thats kinda kool. i can get used to that! Yes. It makes certain interesting things possible. However, don't get too used to them. Pointers are powerful, but they're dangerous too. Understanding them is key to understanding C++, but that understanding includes knowing when not to use them. A simple example:
Pretty standard stuff, right?
Whoa! Hold the horses! What's that * doing in the middle of things? That's the C++ (and C/Obj-C) way of declaring a pointer variable. But right now it's npt pointing to anything in particular, which in C and C++ terms means it could be pointing to any random thing. Can't overstate how dangerous this is.
Much better. We've initialized the pointer with the address of i. The & is the "address of" operator. Read that line as "integer pointer j is address of i."
Wait a second, why don't I see 42 on the screen? This is because j is just storing the location in memory of i. What you're seeing is that address. It's basically just another int.
Ah, much better. I've used the * operator to "dereference" the pointer, getting at the variable it's actually pointing to. |
Author: | Mazer [ Mon Sep 27, 2004 7:32 am ] |
Post subject: | |
Pointers! This one is fun to watch: http://cslibrary.stanford.edu/104/ |
Author: | apomb [ Mon Sep 27, 2004 8:52 am ] |
Post subject: | |
![]() ![]() |
Author: | wtd [ Mon Sep 27, 2004 12:52 pm ] |
Post subject: | |
Use MinGW, the Minimalist GNU for Windows compiler. The easiest way to install it is via Dev-C++, which can be acquired here. You can use the tools via the command-line (the ideal way to start out) by placing the path to the "bin" directory in your PATH environment variable. If you need help with this it can be provided (please indicate if you're using Windows 95, 98, ME or 2000 or XP). Also, if you decide to use the Dev-C++ integrated development environment, there are people here with plenty of experience with that program. |
Author: | rizzix [ Mon Sep 27, 2004 2:16 pm ] |
Post subject: | |
for borland u can download it right here: http://borland.com/products/downloads/download_cbuilderx.html# you need to register.. and then they send u a key through the email.. its a matter of just installing it and downloading the key... and using the key to complete installation.. then ur done. NOTE: you need to download the "Personal" one. there really is not much lack of functionality just that some enterprice etc etc.. stuff is not available. |
Author: | apomb [ Mon Sep 27, 2004 4:45 pm ] |
Post subject: | |
ok heres what i have : EDIT: I downloaded DEV-C++ ... now what the crap do i do ... theres nothing to actually run ... every time i try, it says "2 C:\Dev-Cpp\Examples\WinAnim\2 unable to run program file. " ... WHY!?!? btw, i have Windows ME ![]() Oya, i dL'ed DivC++ at school, thats the easiest, only 2. something mb! rizzix: 810 MB!!! too big for my needs, just take too long ... like 21 hours or something! like i said earlier, i now have DEV-C++ on my home comp... and borland... but cant get either to run |
Author: | rizzix [ Mon Sep 27, 2004 9:05 pm ] |
Post subject: | |
hmm its only: 327 Mb... i think thats wht it says on the site nywyz.. but u do have the free borland compiler (BCC55)? hmm follow the instruction in the readme file i think. yep i did something like that.. but if u still dont get it.. i'll post u the .cfg file that i have. |
Author: | wtd [ Mon Sep 27, 2004 9:33 pm ] |
Post subject: | |
Do a search on your hard drive for "gcc.exe", then report back with the result. |
Author: | apomb [ Tue Sep 28, 2004 9:09 am ] |
Post subject: | |
Dont worry about the Borland thing, all i have now is Dev-C++, its pretty kool but i have this problem : i cant run any code ... or mabe thats what the gcc is for ... im not sure but its not on the school computer that i downloaded Dev-C++ onto. I will check at my house for that file when i get there |
Author: | wtd [ Tue Sep 28, 2004 12:51 pm ] |
Post subject: | |
Did you find where "gcc.exe" is located on your computer? |
Author: | apomb [ Tue Sep 28, 2004 5:03 pm ] |
Post subject: | |
It is not here ![]() ![]() |
Author: | wtd [ Tue Sep 28, 2004 5:15 pm ] |
Post subject: | |
Are you certain? You need to have installed Dev-C++ so it includes GCC. This one looks to do that: http://prdownloads.sourceforge.net/dev-cpp/devcpp4970-gcc32.exe Oh heck, just go out and install Linux. Thatw ay you'll have a platform you can actually develop on. This Windows crap is getting really old. |
Author: | JHanson90 [ Tue Sep 28, 2004 7:26 pm ] |
Post subject: | |
OK, this is slightly off-topic, but... wtd wrote: Oh heck, just go out and install Linux. That way you'll have a platform you can actually develop on. This Windows crap is getting really old. I too have many issues with my Windows machine, and need to install Linux to do what I want. I would look on Google, but I've learned to trust this community very well, in many cases better than I would any old website; I need some information, if you could. My family currently does not want me to install Linux. "My family" meaning my brother, because he is our current designated comp wiz. He's a Microsoft lacky, he insists on doing everything the M$ way: it might be hard to convince him. What are some major hard facts I could hit about Linux that would be way better than Windows for what I am doing? Also, what's the best distribution to use that has all the features I would need, but also preferably one that is more pleasing to the eye to look at than some of the uglier GUIs? Any help is greatly appreciated. |
Author: | apomb [ Tue Sep 28, 2004 9:52 pm ] |
Post subject: | |
wtd wrote: Oh heck, just go out and install Linux. That way you'll have a platform you can actually develop on. This Windows crap is getting really old.
Absolutely! ... The next damn computer i get willl have Linux, and FireFox and C++ ... Thats IT!!! ![]() |
Author: | Genesis [ Tue Sep 28, 2004 10:01 pm ] |
Post subject: | |
JHanson90 wrote: I too have many issues with my Windows machine, and need to install Linux to do what I want. I would look on Google, but I've learned to trust this community very well, in many cases better than I would any old website; I need some information, if you could. My family currently does not want me to install Linux. "My family" meaning my brother, because he is our current designated comp wiz. He's a Microsoft lacky, he insists on doing everything the M$ way: it might be hard to convince him. What are some major hard facts I could hit about Linux that would be way better than Windows for what I am doing? Also, what's the best distribution to use that has all the features I would need, but also preferably one that is more pleasing to the eye to look at than some of the uglier GUIs? Any help is greatly appreciated.
Slightly off topic indeed. But I'm always one for promoting Linux. 1) You can have Windows and Linux on the same hard drive, so there may not even be a need to convince your brother of anything, except to share the HD. Partition half of it for Linux, and half for Windows. You don't even need to format the drive to do this. (Or you could install a seperate hard drive for Linux.) That's one of the great things about it, it's fairly friendly with Windows on the same computer. It comes with a boot program that lets you select which OS you want to boot, and you can access your NTFS partition (Windows) files from Linux. (In most distros anyways.) 2) A good distro that has all the support you need/looks good right of the bat/is user friendly, is Suse. I'd highly reccomend it. Check out www.suse.com. 3) It's hard to explain what makes Linux so much better than Windows (Other than stability, customization, and power) it's something you kinda have to find out for yourself. You could also check out a Live CD, which lets you run a Linux OS simulation right off of a CD, from Windows. I've never tried one, and have heard mixed feelings about them, but it's always an option. But no matter what you do, you're probably going to always want to have XP on your system in some form or another. I use it to run Photoshop (Because the GIMP is not better, I don't care what people say), to run 3DS Max, Visual Basic, as well as other graphics software and software not compatible with Linux or WINE. And also to play games. Also check around this site, there's a few topics that discuss Linux and different distros if you're looking for more info. |
Author: | wtd [ Tue Sep 28, 2004 10:09 pm ] |
Post subject: | |
If your family has a lot of "stuff" on their computer, it's going to be difficult to convince them to change. People don't like change. Besides, ifyou suggest it, and for some reason something bad happens, then it's your fault, and that's not a good position to be in. The best suggestion is to buy or build your own computer. That way you never have to consider your family's wishes when making a change to it, and this gives you a lot of freedom to explore the computing world. It doesn't have to be anything particularly spectacular, but can be if you have a large budget. |
Author: | JHanson90 [ Tue Sep 28, 2004 10:21 pm ] |
Post subject: | |
Genesis wrote: JHanson90 wrote: I too have many issues with my Windows machine, and need to install Linux to do what I want. I would look on Google, but I've learned to trust this community very well, in many cases better than I would any old website; I need some information, if you could. My family currently does not want me to install Linux. "My family" meaning my brother, because he is our current designated comp wiz. He's a Microsoft lacky, he insists on doing everything the M$ way: it might be hard to convince him. What are some major hard facts I could hit about Linux that would be way better than Windows for what I am doing? Also, what's the best distribution to use that has all the features I would need, but also preferably one that is more pleasing to the eye to look at than some of the uglier GUIs? Any help is greatly appreciated.
Slightly off topic indeed. But I'm always one for promoting Linux. 1) You can have Windows and Linux on the same hard drive, so there may not even be a need to convince your brother of anything, except to share the HD. Partition half of it for Linux, and half for Windows. You don't even need to format the drive to do this. (Or you could install a seperate hard drive for Linux.) That's one of the great things about it, it's fairly friendly with Windows on the same computer. It comes with a boot program that lets you select which OS you want to boot, and you can access your NTFS partition (Windows) files from Linux. (In most distros anyways.) 2) A good distro that has all the support you need/looks good right of the bat/is user friendly, is Suse. I'd highly reccomend it. Check out www.suse.com. 3) It's hard to explain what makes Linux so much better than Windows (Other than stability, customization, and power) it's something you kinda have to find out for yourself. You could also check out a Live CD, which lets you run a Linux OS simulation right off of a CD, from Windows. I've never tried one, and have heard mixed feelings about them, but it's always an option. But no matter what you do, you're probably going to always want to have XP on your system in some form or another. I use it to run Photoshop (Because the GIMP is not better, I don't care what people say), to run 3DS Max, Visual Basic, as well as other graphics software and software not compatible with Linux or WINE. And also to play games. Also check around this site, there's a few topics that discuss Linux and different distros if you're looking for more info. wtd wrote: If your family has a lot of "stuff" on their computer, it's going to be difficult to convince them to change. People don't like change. Besides, ifyou suggest it, and for some reason something bad happens, then it's your fault, and that's not a good position to be in. It's my computer, they all have their own, but yes they don't like change. We are running on a crappy network, and they're paranoid that something will go wrong with everything if I were to use a Linux. They don't know the facts, and would only trust them from my brother, who as I said will probably attempt to keep me from using Linux unless I can convince him first. But, ah, what could go wrong? |
Author: | wtd [ Tue Sep 28, 2004 10:26 pm ] |
Post subject: | |
If it's your computer which isn't shared with anyone, then go for it. Heck, they don't even have to know. My suggestion is to install it when they're away. You aren't likely to have network problems, and again, if you don't share the computer, no one is going to notice. If something does go wrong, just reinstall Windows. Don't make promises beforehand. Don't make a lot of noise about it. Just be quietly smug if/when it does work. ![]() |
Author: | apomb [ Tue Sep 28, 2004 10:46 pm ] |
Post subject: | |
OOO OOOO I Downloaded the REAL one .. That wtd posted ... IT WORKS, it actually RUNS the programs!!! thank you soooooo much for all your help!!! i know youll help me again soon!!! YAY!! ![]() ![]() |
Author: | wtd [ Tue Sep 28, 2004 10:54 pm ] |
Post subject: | |
You're welcome. Now go learn a few other languages and I'll be really proud. ![]() Ruby, O'Caml, Eiffel, etc. |
Author: | apomb [ Tue Feb 01, 2005 7:35 pm ] |
Post subject: | |
Im finally finished first semester and will be beginning my C++ experience in exactly 6 days! i cant wait!!! - i will see this forum often in the next couple months, IM SOO EXCITED! ![]() ![]() |
Author: | wtd [ Tue Feb 01, 2005 7:41 pm ] |
Post subject: | |
Good luck. And do ask questions frequently. That way if you've got any misperceptions or such we can catch them and help you correct them before they get out of hand. ![]() |
Author: | apomb [ Wed Feb 02, 2005 8:28 pm ] |
Post subject: | |
Will do! ![]() |
Author: | BlAcK TuRtLe [ Mon Feb 21, 2005 4:36 pm ] |
Post subject: | |
Actually CompWiz, I'm pretty sure we have Microsoft VC++. |
Author: | wtd [ Mon Feb 21, 2005 4:40 pm ] |
Post subject: | |
BlAcK TuRtLe wrote: Actually CompWiz, I'm pretty sure we have Microsoft VC++.
If that's version 6 then it's a death knell for any chance you have of learning anything useful. |
Author: | BlAcK TuRtLe [ Mon Feb 21, 2005 4:47 pm ] |
Post subject: | |
Quote: BlAcK TuRtLe wrote:
Actually CompWiz, I'm pretty sure we have Microsoft VC++. If that's version 6 then it's a death knell for any chance you have of learning anything useful. Good to know, any particular reason why it bites the big one? |
Author: | wtd [ Mon Feb 21, 2005 4:55 pm ] |
Post subject: | |
BlAcK TuRtLe wrote: Quote: BlAcK TuRtLe wrote:
Actually CompWiz, I'm pretty sure we have Microsoft VC++. If that's version 6 then it's a death knell for any chance you have of learning anything useful. Good to know, any particular reason why it bites the big one? It was designed to be a good Windows compiler, which doesn't necessarily equate with a good C++ compiler. VC++6 does a particularly bad job of implementing the C++ standard libraries, and often trips over basics of the language itself, especially templates, which are probably C++'s most powerful feature. For students this becomes a problem when you're given perfectly valid C++ code and your compiler tells you otherwise. The C++ compiler with Visual Studio .NET is much better, but so is GCC, and the latter is everywhere, while the former is limited to recent versions of Windows (it is really good there, though). |
Author: | apomb [ Mon Feb 21, 2005 10:13 pm ] |
Post subject: | |
Wow there Helf, ya blow hard, i kinda figured that one out ... did you notice the date on my post? ... it was BEFORE we started. Good to see you back tho, Welcome ![]() ![]() ANYWHOO ps Black turtle: we need to go to Romes again soon! lol |
Author: | wtd [ Mon Feb 21, 2005 10:18 pm ] |
Post subject: | |
Which distro? |
Author: | apomb [ Tue Feb 22, 2005 9:34 pm ] |
Post subject: | |
see: nEwB in ubuntu ... |
Author: | wtd [ Tue Feb 22, 2005 9:47 pm ] | ||
Post subject: | |||
Ah yes.
For C and C++ compilers. |
Author: | apomb [ Tue Feb 22, 2005 9:58 pm ] |
Post subject: | |
kk, one more time, when it says "no input files" what do i do? i forget |
Author: | wtd [ Tue Feb 22, 2005 11:34 pm ] | ||||||||||
Post subject: | |||||||||||
CompWiz333 wrote: kk, one more time, when it says "no input files" what do i do? i forget
You provide the name of your source file.
Save that as hello.cpp, and compile with:
Then run with:
a.out is the name of the output file by default, but you can use the "-o" option to specify an output file.
|