Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Programming. | 3 guests
Acmlm's Board - I2 Archive - Programming - C++ | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
Drag

Flurry

I don't post anymore! o_O
Level: 26

Posts: 48/254
EXP: 98946
For next: 3329

Since: 03-15-04
From: Deogon Vally, Dragon Country

Since last post: 316 days
Last activity: 44 days
Posted on 03-20-04 02:09 AM Link | Quote
Basically, I'm interested in learning C++, and I would like to know how to start. I know how to program, so learning C++ would basically just be learning the language, and then I'd be set. So, I have a few questions.

Is C++ a program, or is it a compiler?
Can I debug my C++ program like I can in VB? (When an error comes up, it goes to the code screen and highlights what's wrong) Would this be what MS Visual C++ is?
Would it be more effective if I wrote my code in raw notepad, or in Visual C++?
Is Visual C++ the right name?
Is C++ an object oriented programming language like VB, or is it straight top-to-bottom + modular programming like QB is?
Is C++ MUCH FASTER than VB and QB?
Why, if there is a reason? (Just out of curiosity. )
What are *.c and *.h (or whatever) files?
Will you give me a sandwich if I ask for one?
Can you make it ham and cheese?

Those are basically my main questions, and if there is anything else that I should know, please tell me!

Thanks a lot!
Acmlm

Torosu
heh
Level: 51

Posts: 243/1173
EXP: 981994
For next: 31944

Since: 03-15-04
From: Somewhere that isn't outside of Sherbrooke, Québec, Canada

Since last post: 39 days
Last activity: 3 hours
Posted on 03-20-04 03:07 AM Link | Quote
I can at least answer some of it:

C++ is simply a programming language, there's many different compilers for it (some are only command-line, others have a full interface)

Yes, you can debug C++ programs, but it depends on which compiler you use ... but something like Visual C++ will have that ...

Whether you write the code shouldn't make a difference ... but command-line compilers will obviously require you to write the code in plain text editors

And yes, it's Visual C++, but that's only Microsoft's C++ compiler

C++ can definitely be object oriented ... as soon as you get into classes and methods, that's object oriented programming ...

It's faster than Basic (if it generates better compiled code ... can be a whole lot faster but sometimes there won't be that much of a difference, it depends), but it's at least more powerful and you get more control on things ... C++ even allows ASM within the code

.c is a C file (C++ will usually use .cc or .cpp instead), and .h is a header file ... .h is also C/C++, but normally included from a .c or .cpp

I'd give you a ham and cheese sandwich if I was in your house, I don't think I can send one through the Internet


Oh, and if you've done some PHP before ... you'll notice C++ has a pretty similar structure, this usually helps getting started
FrenziedPanda89

Micro-Goomba
Level: 8

Posts: 5/19
EXP: 2022
For next: 165

Since: 03-16-04
From: Canada

Since last post: 553 days
Last activity: 339 days
Posted on 03-20-04 03:15 AM Link | Quote
C++ is a program language, it can have many compilers (borland, MS, djgpp etc)
Depending on your compiler & ide you can debug *like* vb, but not exackly the same.

No writing code in raw notepad is terrible, you sould allways to to use an IDE and there are alot of them. I just heard of RadAsm which lets you write any assemble in it, organize your file and a bunch of other things and its free. Somone send me a cc65 ini file so i can write 6502 asm in it. You still need the assembler and stuff as you would need a compiler for C. There is allmost an ide for everything (seen to many html ones )

Here is a site to start you off and it has some compilers if you need them.
http://www.cprogramming.com/tutorial.html

Also yes C++ is faster, mosty cause when you use a function(iif, dir) or get a propperty (me., picbox.) it runs it WHOLE sub through the DLL, so that makes it slow cause the code goes back and forth and the dll checks every line(i think).

C does all the work in the exe, it doesnt check anything. VB just likes to check & change subs based on the newest vb dll (i think..) thats why its slow.

Good luck with your stuff
Dish

Spiny
Level: 38

Posts: 5/596
EXP: 355646
For next: 14801

Since: 03-15-04
From: Disch

Since last post: 18 days
Last activity: 18 days
Posted on 03-20-04 03:38 AM Link | Quote
VB and QB are slow because they're not really programming languages. They're more like scripting languages. VB isn't "compiled" the same way C/C++ is. C/C++ compiles to the machine code of the target platform... whereas VB compiles to a pseudo-code that gets interpreted at runtime (which is why a VB app by itself is useless without VB runtimes installed).
jescis

Red Goomba
Level: 11

Posts: 7/38
EXP: 5724
For next: 261

Since: 03-15-04
From: Ledbetter, KY USA 42058

Since last post: 92 days
Last activity: 90 days
Posted on 03-20-04 04:00 AM Link | Quote
Originally posted by Disch
VB and QB are slow because they're not really programming languages.


Not true basic is "Beginners All-purpose Structured Instruction Code"

Originally posted by Disch
VB isn't "compiled" the same way C/C++ is. C/C++ compiles to the machine code of the target platform... whereas VB compiles to a pseudo-code that gets interpreted at runtime (which is why a VB app by itself is useless without VB runtimes installed).


also not true depending on version of basic you are talking about.
Dish

Spiny
Level: 38

Posts: 6/596
EXP: 355646
For next: 14801

Since: 03-15-04
From: Disch

Since last post: 18 days
Last activity: 18 days
Posted on 03-20-04 05:58 AM Link | Quote
I know I've heard that several times before.. but offhand I can't give you any sources. I suppose I was just passing hear-say
Drag

Flurry

I don't post anymore! o_O
Level: 26

Posts: 49/254
EXP: 98946
For next: 3329

Since: 03-15-04
From: Deogon Vally, Dragon Country

Since last post: 316 days
Last activity: 44 days
Posted on 03-20-04 06:19 AM Link | Quote
Yeah, I thought PHP looked like C when I first looked at the code. Actually, anything with semicolons, {} and () in if/while/switch(select case) statements looks like a beyond-basic programming language to me.

I like it. I think C++ and I will make a great team! I'll probably get Visual C++ because of the debugger however. Hopefully it won't crash randomly like VB5 does.

I'm really getting interested in this now... hopefully the raycaster program I programmed in VB will run MUCH faster or smoothly in C++. Ken Silverman programmed his 3d graphic routines in qbasic (slow slow slow), and then when he ported it to C++, it went MUCH faster.

People say C++ is really confusing / hard. I really don't think it could be that hard or confusing after you learn the language, because if it's hard or confusing, it's mostly because the user's PROGRAMMING skills are novice or beginner. I remember I have a cd called "Tricks of the Mac Game Programmer Gurus" (has a lot of game demos and it came in a huge book full of programming tricks, stuff, and code), and that's when I saw a LOT of code that looked like C (it probably was. Compiled C and C++ code can run on anything with a processor, can't it? Hello GP32 programming! ). I was like 8 at the time, so you can imagine I couldn't understand a single bit of that.

Like I said, I'm HOPING that the only part that'll be even slightly challanging will be learning the language itself. Programming, itself, is easy for me. I hope I LOVE C++! (So much anticipation... not even ASM scares me anymore. )

Thanks for the information guys! Keep it coming if there's more!


(edited by Drag on 03-19-04 09:20 PM)
Weasel
Missionary in Peru
Level: 34

Posts: 65/454
EXP: 236444
For next: 17207

Since: 03-15-04
From: Washington

Since last post: 467 days
Last activity: 339 days
Posted on 03-20-04 08:52 PM Link | Quote
Before you jump at buying Visual C++, get the .NET version (Visual C++.NET). It sucks up a lot of space on your hard drive (have at least 2 gigs if you install the full library), but... well... VC6 just sucks.


In fact, before you jump at buying VC.NET, get Dev-C++5, made by Bloodshed or whatever company. It has a decent debugger, and best of all, it's free! Plus it only consumes like 50 MB or something anyway.
neotransotaku

Baby Mario
戻れたら、
誰も気が付く
Level: 87

Posts: 229/4016
EXP: 6220548
For next: 172226

Since: 03-15-04
From: Outside of Time/Space

Since last post: 11 hours
Last activity: 1 hour
Posted on 03-20-04 11:09 PM Link | Quote
C++ is essentially C. All a C++ compiler does is rewrite your code into C--meaning if you create a class and objects, etc, it will transform them into structs and functions. That is why you can still use a C++ compiler to compile C code.

Anyways, the best advice for C++ I can give is know how you use memory and be careful in how you deal with pointers. Remember, that when passing values, they aren't always what they appear to be. So if you keep on getting Segmenation Faults (a.k.a. Bad memory referencing), then take a look at how you are using your data.
E-VIL

Micro-Goomba
Level: 7

Posts: 6/13
EXP: 1145
For next: 303

Since: 03-15-04
From: Montreal, Qc. [Canada]

Since last post: 579 days
Last activity: 339 days
Posted on 03-22-04 08:30 PM Link | Quote
well, if u can do C, and u can do VB, C++ aint all that different.
after learning like 6 or 7 programming languages in college i can safely say that they're mainly all the same.. and that alot of em are completely useless unless you're some kind of programming nut and feel it is important to know them all.

eh i like visual studio to compile it. i would deffinitely suggest "buying" it. I got mine for free from the school.. they give a free copy to comp. science students over here.. anyhow, visual studio is user friendly... and even if u hate user-friendly-ness. it always comes in handy in alot o situation.. and yeh u can do visual crap using MFC (microsoft foundation classes). good luck with image transparencies and stuff tho.. those'll give u headaches.. but you can do some nice stuff using direct 3d using MFC..

well, if you intend to someday make a career in programming, the language they mainly teach in colleges/universities (around here atleast) is Java.... at the moment... 2 years ago was c++... but when you go and code stuff for a company, they really dont care what language you use, as long as your program works perfectly. Unless they have specific specifications, or everything else they have is in C++.. then they'd rather you use C++.. but once you know one programming language, 2 - 3 weeks n u can learn a new one completely..

not that i want to or anything, i know enough already.. i'm tired of programming.!
MathOnNapkins

Math n' Hacks
Level: 67

Posts: 15/2189
EXP: 2495887
For next: 96985

Since: 03-18-04
From: Base Tourian

Since last post: 1 hour
Last activity: 32 min.
Posted on 03-30-04 01:58 AM Link | Quote
It's kind of funny, but most of the CS students at my collage are made to study Scheme. Not that it's a bad language.
Acmlm

Torosu
heh
Level: 51

Posts: 400/1173
EXP: 981994
For next: 31944

Since: 03-15-04
From: Somewhere that isn't outside of Sherbrooke, Québec, Canada

Since last post: 39 days
Last activity: 3 hours
Posted on 03-30-04 02:24 AM Link | Quote
I had to learn Scheme last semester at university ... a language where everything (and I mean it) is made of functions, and only functions (with variables and constants) ... stuff like this:

(define inc (lambda (x) (+ x 1)))
(define + -)
(inc (+ 2 6))

This defines inc as a function of parameter x that returns x + 1, then redefines + to be the function -, and executes inc(2+6), which will return -3


As for C++, I've done a fair amount at university now, but all of it so far was either commandline or DOS ... I still want to learn how it all works in Windows and such

I think the best compiler I have is an expired evaluation copy of Borland C++ Builder 6 (I can still use it if I change my computer time), which looks just like Delphi but does C/C++ instead
setrodox

Ninji
Level: 26

Posts: 184/238
EXP: 89717
For next: 12558

Since: 03-15-04
From: good old austria

Since last post: 178 days
Last activity: 61 days
Posted on 03-30-04 12:29 PM Link | Quote
in my opinion c++ is the best language and the g++ is the best compiler for most things like games or high speed apps. other languages or good for other things. basic dialect(visual basic, blitz basic) are good for small projects. scripting languages like php or perl are good for web programming. and yes c++ IS the fastest language beside assembler, when you can use it.
Tuvai
Permanently banned for account hacking.
Level: 24

Posts: 125/211
EXP: 74894
For next: 3231

Since: 03-15-04

Since last post: 566 days
Last activity: 339 days
Posted on 03-30-04 02:11 PM Link | Quote
There is no 'best' programming language. It all depends on what you need it for. If I need to make a webshop for a website, I need to choose out of a server side language which is capable of performing whatever I want to make in the webshop; some server-side languages are PHP, ASP, JSP, CGI/Perl and so on. In my case that's PHP since I've been working with it for years now.

If I need to make a Windows program, I need to use a language and a compiler you make programs with, in that case I got Visual Basic or C++. In my case that's Visual Basic since I know how to use it for a bit.

My point is, it all depends on what you need to do. If you're an application developer you don't need to know server-side languages or HTML, except if you are a programming junkie. I for one am always interrested in learning another (as long as it's useful) programming language
setrodox

Ninji
Level: 26

Posts: 195/238
EXP: 89717
For next: 12558

Since: 03-15-04
From: good old austria

Since last post: 178 days
Last activity: 61 days
Posted on 03-30-04 02:20 PM Link | Quote
as i said: in my opinion c++ is the best language and the g++ is the best compiler for most things like games or high speed apps. i haven't said it's the best overall language. i know that an because of that i program in : c/c++(no c#, i don't like it), pascal, some basic dialekts, perl, php, unrealscript, cobol and brainfuck. maybe some others i forgot. you really need to know what you want to do if you want to know which language to choose. c++ is perfect when you need speed in a huge project like a fps. if make such a huge project, you should learn how to program oop(object orientated programming). it's a style how to write the code and how to use classes. but if you don't want to make a huge project you can use a basic dialekt. i don't like vb so much bu blitz basic. it's a basic dialekt mainly for writing games. the new version blitzmax will be great.(if it comes... it was announced a long time ago).
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Programming - C++ | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.007 seconds.