Author |
Message |
Solid_Fire Server Help Squatter
Age:34 Gender: Joined: Dec 22 2004 Posts: 327 Location: NV. Dont stalk me..plz.. Offline
|
Posted: Sun Jan 23, 2005 1:57 am Post subject: Learning C++... |
|
|
|
|
I just started reading a tutorial at www.cplusplus.com and try to learn it.
Can anyone give me some examples and tips on how to get better at this and how to create test program to make sure i understand and practice of that? i have Miracle C as a compiler. Any kind of help would be great. _________________ Unknown Webmaster, Confused Game Player |
|
Back to top |
|
|
Chambahs Guest
Offline
|
Posted: Sun Jan 23, 2005 10:21 am Post subject: |
|
|
|
|
i tried learning C++, but i quit, its too complicated...good luck |
|
Back to top |
|
|
Cyan~Fire I'll count you!
Age:36 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Sun Jan 23, 2005 11:21 am Post subject: |
|
|
|
|
The best way to learn a language is to make something in it. Just try thinking of some idea.
The material on that site is enough to learn in general. If you have sepcific questions, I'll be glad to answer them. _________________ This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him. |
|
Back to top |
|
|
Solid_Fire Server Help Squatter
Age:34 Gender: Joined: Dec 22 2004 Posts: 327 Location: NV. Dont stalk me..plz.. Offline
|
Posted: Sun Jan 23, 2005 2:18 pm Post subject: |
|
|
|
|
ok, first question i have is that i know "cout" is the output right? and when i do examples in Miracle C it gives me an error saying
Miracle C Compiler (r3.2), written by bts.
line 3: #include iostream.h ignored--file not found.
Compiling C:\Program Files\Miracle C\test.c
main
C:\Program Files\Miracle C\test.c: line 7: variable 'cout' not found
'<< "Hello World!"'
aborting compile
|
here is the example :
// my first program in C++
#include <iostream.h>
int main ()
{
cout << "Hello World!";
return 0;
}
|
I don't understand why it is saying that, maybe its the program im using? |
|
Back to top |
|
|
Solo Ace Yeah, I'm in touch with reality...we correspond from time to time.
Age:36 Gender: Joined: Feb 06 2004 Posts: 2583 Location: The Netherlands Offline
|
Posted: Sun Jan 23, 2005 2:33 pm Post subject: |
|
|
|
|
Your code is C++ indeed, but are you sure that "Miracle C Compiler" supports C++?
Also, you should let code files with C++ code in them have the extension .cpp.
I think it should be
#include <iostream>
using namespace std;
int main ()
{
cout << "Hello World!";
return 0;
} |
or
#include <iostream>
int main ()
{
std::cout << "Hello World!";
return 0;
} |
but this would burn Ek's eyes.
For a decent and free IDE with a compiler supporting C++ (I think it uses MingW or something) try Bloodshed Dev-C++.
Last edited by Solo Ace on Sun Jan 23, 2005 2:40 pm, edited 1 time in total |
|
Back to top |
|
|
Mr Ekted Movie Geek
Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Sun Jan 23, 2005 2:36 pm Post subject: |
|
|
|
|
It already has. I am typing blind now...
If you want to learn C++ forget iostreams. Learn C first. That will give you syntax, data structures, etc. Then learn OOP concepts after. _________________ 4,691 irradiated haggis! |
|
Back to top |
|
|
D1st0rt Miss Directed Wannabe
Age:36 Gender: Joined: Aug 31 2003 Posts: 2247 Location: Blacksburg, VA Offline
|
|
Back to top |
|
|
Solo Ace Yeah, I'm in touch with reality...we correspond from time to time.
Age:36 Gender: Joined: Feb 06 2004 Posts: 2583 Location: The Netherlands Offline
|
Posted: Sun Jan 23, 2005 2:46 pm Post subject: |
|
|
|
|
N0b.
Quote: | helloworld.cpp(5) : error C3861: 'printf': identifier not found, even with argument-dependent lookup |
#include <stdio.h>
|
|
Back to top |
|
|
Solo Ace Yeah, I'm in touch with reality...we correspond from time to time.
Age:36 Gender: Joined: Feb 06 2004 Posts: 2583 Location: The Netherlands Offline
|
|
Back to top |
|
|
Cyan~Fire I'll count you!
Age:36 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
|
Back to top |
|
|
Solid_Fire Server Help Squatter
Age:34 Gender: Joined: Dec 22 2004 Posts: 327 Location: NV. Dont stalk me..plz.. Offline
|
Posted: Sun Jan 23, 2005 5:24 pm Post subject: |
|
|
|
|
ok, so can someone write out an example program so i can practice it and learn the basics of a C++ and C program?
PLus, i tried DL bloodshed and i use Windows ME, not Win 98,95 or XP (if it runs XP)
So i tried looking for Visual Basic, but didnt know if it was for C++ or for something else. Said Service Pack 6.
I'll keep looking for more C++ Compilers that are easy to work with.
(20-10 Eagles Winning YEA) |
|
Back to top |
|
|
Solo Ace Yeah, I'm in touch with reality...we correspond from time to time.
Age:36 Gender: Joined: Feb 06 2004 Posts: 2583 Location: The Netherlands Offline
|
Posted: Sun Jan 23, 2005 5:42 pm Post subject: |
|
|
|
|
Lies, that'd be 2hard4qndre, and the concept is the same anyway.
Just download Bloodshed's Dev-C++ for Win95/98, ME almost is the same anyway.
Visual Basic is not for C++, please forget that name NOW.
If you really can't work with Dev-C++ get Microsoft Visual C++, it's good but not free though (for something that is free, check this thread).
You don't have many good options left if you give up on Dev-C++/MS VC++.
I never thought I'd recommend this site, many of the "code" sucks, just like most of the "programmers" (well, most don't deserve that title), anyway, Planet Sourcecode is some dump for newbies to show their code.
The "programs" there are mostly small, although most (yes, in this paragraph is the most used word is most) of the code is hard to read without restyling it.
Please, don't become one of them, don't put comments like "SUCK MY ... SCRIPTKIDIEZZ!!! cuz u CANT DO THIS IN VB LOlOloL!!" on top of your documents.
Also, on the website you found your tutorial, cplusplus.com are a few small example programs.
As Cyan said before in this thread, the best way to learn is just by trying to create something.
Start by trying to make something small, try to fix it for a while and when you can't figure something out, feel free to post your questions here.
I tried to start by reading the cplusplus.com tutorial, but since it was in English, and since I never saw any C++ code before, it was too vague. Just by trying to make programs, reading other's code and asking for help taught me more.
Last edited by Solo Ace on Sun Jan 23, 2005 5:58 pm, edited 1 time in total |
|
Back to top |
|
|
D1st0rt Miss Directed Wannabe
Age:36 Gender: Joined: Aug 31 2003 Posts: 2247 Location: Blacksburg, VA Offline
|
|
Back to top |
|
|
Mr Ekted Movie Geek
Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Sun Jan 23, 2005 7:56 pm Post subject: |
|
|
|
|
LOL @ EVERYTHING! Good times. |
|
Back to top |
|
|
myke Seasoned Helper
Gender: Joined: Sep 11 2003 Posts: 142 Offline
|
|
Back to top |
|
|
Animate Dreams Gotta buy them all! (Consumer whore)
Age:36 Gender: Joined: May 01 2004 Posts: 821 Location: Middle Tennessee Offline
|
Posted: Mon May 15, 2006 12:23 am Post subject: |
|
|
|
|
You know, I may not be the best person to help people with programming, but if you're having problems with learning to program from that website like I did, I would suggest buying a C++ book. They can be kinda expensive, so I'd suggest buying one used off of Amazon or something. I personally had a hard time trying to learn from websites. What Cyan said is definitely right, if you don't work with the language, you aren't going to remember it. I got through 400 pages of my C++ book and was into all kinds of things, and I can't even remember the names anymore.
I would suggest either Sam's Teach Yourself C++ In 21 Days by Jesse Liberty, or Ivor Horton's book, I think it's called Beginning C++. The Sam's book may be written by someone else now, since I think my version (fourth edition) is slightly old. Ivor Horton's book is probably a bit harder, but any idiot should be able to understand both, it spells it out pretty cleanly. Although, if I'm the spokesman for these books, it probably doesn't mean much. =x They are both very thorough, though, and you wouldn't be disappointed with them. |
|
Back to top |
|
|
Bak ?ls -s 0 in
Age:25 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
Posted: Mon May 15, 2006 2:03 am Post subject: |
|
|
|
|
can you get a program compiling? |
|
Back to top |
|
|
Smong Server Help Squatter
Joined: 1043048991 Posts: 0x91E Offline
|
Posted: Mon May 15, 2006 4:27 am Post subject: |
|
|
|
|
Moved thread from "ASSS Custom Projects" to "Non-Subspace Related Coding" since it didn't metion asss once (unitl now of course). |
|
Back to top |
|
|
D1st0rt Miss Directed Wannabe
Age:36 Gender: Joined: Aug 31 2003 Posts: 2247 Location: Blacksburg, VA Offline
|
Posted: Tue May 16, 2006 12:43 pm Post subject: |
|
|
|
|
Am I the only one that noticed the ridiculous bump? (Tipped off by the Qndre references) |
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Tue May 16, 2006 10:28 pm Post subject: |
|
|
|
|
Not the only one... but I just figured MGB would delete the posts and any reply I made commenting on it would just end up deleted. _________________ Hyperspace Owner
Smong> so long as 99% deaths feel lame it will always be hyperspace to me |
|
Back to top |
|
|
CypherJF I gargle nitroglycerin
Gender: Joined: Aug 14 2003 Posts: 2582 Location: USA Offline
|
Posted: Thu May 25, 2006 1:12 pm Post subject: |
|
|
|
|
imho, this is a much better C++ learning site than cplusplus.com ...
http://www.ibiblio.org/obp/thinkCS/cpp/english/ _________________ Performance is often the art of cheating carefully. - James Gosling |
|
Back to top |
|
|
Mr Ekted Movie Geek
Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Thu May 25, 2006 1:24 pm Post subject: |
|
|
|
|
That site sucks. |
|
Back to top |
|
|
Doc Flabby Server Help Squatter
Joined: Feb 26 2006 Posts: 636 Offline
|
Posted: Fri May 26, 2006 3:36 pm Post subject: |
|
|
|
|
if u like the m$ option u can get microsoft c++ express here (its free)
http://msdn.microsoft.com/vstudio/express/visualc/
If you are making windows apps (not console) you would do well to download the windows SDK as well.
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
I have found Dev-C++ much much easier to use than c++ express and visual c 6 but im a noob at c and c++ i havnt written anything over like 20 lines.
All the online "lessons" i've seen in c++ teach you the essentials of programming (which is the same for all languages) but not how to code in c++. I think the only way i will ever learn is if force myself to code some stuff in it, but c# is so easy - especailly with all those managed libs [/b] |
|
Back to top |
|
|
SamHughes Server Help Squatter
Joined: Jun 30 2004 Posts: 251 Location: Greenwich Offline
|
Posted: Tue May 30, 2006 9:21 pm Post subject: |
|
|
|
|
Ekted, why do you hate iostreams? |
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Tue May 30, 2006 9:33 pm Post subject: |
|
|
|
|
Because he has a mistaken view of how it works (link).
Mr Ekted wrote: | Use of iostreams and strings = more CPU cycles = more heat on whatever processor you choose. |
At least, thats the reason he gives. I expect he actually had a bad experience and is taking the trauma out on us
NOTE: not spellchecked |
|
Back to top |
|
|
|