Teach yourself C++

Get help on programming - C++, Java, Delphi, etc.
SBSP
Registered User
Posts: 3124
Joined: 09 May 2006, 02:00
Location: Centurion

Post by SBSP »

Hex_Rated wrote:
gosub is more equivelant to the JNZ, JNE, JZ, etc. Whilst GOTO is basicly JMP.
No. GOSUB was used in very old BASIC. It is an unconditional jump as well. JNZ, JNE, JZ, JE, etc are all conditional. Used when you had to define the line number for each line of code.

eg:

10 GOSUB MYSUB
20 PRINT "Hello 1"

30 SUB MYSUB
40 PRINT "Hello 2"
50 RETURN
55 REM or was it END SUB? Can't remember
60 PRINT "Hello 3"

Would generate
Hello 2
Hello 1
Hello 2
Hello 3

IIRC. This was the state of BASIC programming in Dijkstra's day. Which is probably why he condemned it.
REM is probably for REMOVE (Remove as in remove from code) when compiling :wink:

Sub CheckComment
10
if Mid(strLine ,1,3) = "REM" then
comment out
else
end if

Goto 10
End sub





It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.
True!!!
I hate C++ i cant grasp it , especially when things dont run in steps
thealluseless
Registered User
Posts: 614
Joined: 29 Dec 2006, 02:00
Location: somewhere in the blight

Post by thealluseless »

I hate C++ i cant grasp it , especially when things dont run in steps
huh? maybe its because what i really started in, but it is so logical to me, it does run in steps? unless i misunderstand what u mean by steps??

wanna hate programming, start doing plc stuff, it will make u hate life, i promise.
I can picture in my mind a world without war, a world without hate. And I can picture us attacking that world, because they'd never expect it.
Hex_Rated
Registered User
Posts: 3679
Joined: 19 Jan 2006, 02:00
Contact:

Post by Hex_Rated »

@supertwit: I never thought I'd recommend this language but Java fits all those requirements. Luckily high performance isn't one of them.
DFI LanParty X48 LT-2TR
Intel Q9450 @ 3.2Ghz
Dell 24" 2408WFP | Phillips 37" 1080p
Sapphire HD4870 X2 2GB
4GB Corsair DDR-2 1066 | Thermalrite 120 Ultra Extreme | G9 Mouse | G15 Keyboard
Vista Ultimate x64
thealluseless
Registered User
Posts: 614
Joined: 29 Dec 2006, 02:00
Location: somewhere in the blight

Post by thealluseless »

I never thought I'd recommend this language but Java fits all those requirements
i felt the jump from c++ to java pretty smooth because of the fact that i had done c?? difficult to recommend to some one where to start, since i dunno what its like looking at java if u know nothing else? I felt c was ver eays to use
I can picture in my mind a world without war, a world without hate. And I can picture us attacking that world, because they'd never expect it.
SBSP
Registered User
Posts: 3124
Joined: 09 May 2006, 02:00
Location: Centurion

Post by SBSP »

Umm yes it does but sometimes not :lol:

Well to me it seems like it.

Maybe when you start with functions it seems like it's not running Line by line.

In VB things run from Line to the next line until you tell it to got to a
new sub and so on.

Edit:

People can say what they want about VB.

But this has helped me out many times.
I'm in job position Where I.T Stuff is seen as always possible and has to make things work, exactly they way i'm told. Even though i dont do programming for a living, i found ways to solve stuff using VB.

Especially when it comes to Reports, or getting data extracted.

C++ to me is just a bit too much, Not for the Lazy :lol:
Last edited by SBSP on 11 Jun 2007, 16:20, edited 1 time in total.
thealluseless
Registered User
Posts: 614
Joined: 29 Dec 2006, 02:00
Location: somewhere in the blight

Post by thealluseless »

ok i get what ur saying but i kinda like the fact that u got

function defs

main ()
{

funtion1();
funtion2();
funtion3();

return
}

for me its easy as hell to read and follow, and easy to troubleshoot.
each to his own i guess.
I can picture in my mind a world without war, a world without hate. And I can picture us attacking that world, because they'd never expect it.
PHR33K
Registered User
Posts: 779
Joined: 05 Sep 2004, 02:00
Contact:

Post by PHR33K »

I dont see why people find C/C++ difficult. Its straight forward and simple.
User avatar
StarPhoenix
B.Soc.Sci, M.SocSci [UPCF]
Posts: 17634
Joined: 11 Dec 2003, 02:00
Processor: Core i5 3470
Motherboard: Gigabyte G1 Sniper Z77
Graphics card: nVidia GeForce GTX 1060
Memory: 8Gb DDR3 1600
Location: East London
Contact:

Post by StarPhoenix »

Perhaps a little too cryptic for some?
PHR33K
Registered User
Posts: 779
Joined: 05 Sep 2004, 02:00
Contact:

Post by PHR33K »

Its cryptic at first, but then again, what programming language isnt. Its confusing at first, but you soon get over it
User avatar
Ron2K
Forum Technical Administrator
Posts: 9050
Joined: 04 Jul 2006, 16:45
Location: Upper Hutt, New Zealand
Contact:

Post by Ron2K »

I've said before why any BASIC variant (including Visual Basic) is for Quiche Eaters; search the programming section and you will find my rants.

I do most of my coding in C# but I do know a bit of C++ (need to get hold of a good textbook so I can teach myself more). C++ is more difficult than C# but is ultimately more powerful. There's a few other languages I'd also like to learn, like Python and Ruby. Given the amount of web stuff that I run (my own website, the FRAG LAN website, a support forum (soon to add another one)), I guess I should really learn some PHP as well.

Mind you, we all may be programming in LOLCODE soon... :P
Kia kaha, Kia māia, Kia manawanui.
PHR33K
Registered User
Posts: 779
Joined: 05 Sep 2004, 02:00
Contact:

Post by PHR33K »

Well, like i said, im busy writing a compiler for it :lol:
Hex_Rated
Registered User
Posts: 3679
Joined: 19 Jan 2006, 02:00
Contact:

Post by Hex_Rated »

I've said before why any BASIC variant (including Visual Basic) is for Quiche Eaters; search the programming section and you will find my rants.

I do most of my coding in C#
You do realize that they are practically the same language at heart with some syntactical differences, right? I much rather prefer using C# over VB.NET because it is closer to C/C++, which is my language of choice, but it doesn't have any performance / stability or functionality advantage over VB.NET. AFAIK, they sacrificed all those for interoperability that MSIL offers. Unless you know something I don't?
DFI LanParty X48 LT-2TR
Intel Q9450 @ 3.2Ghz
Dell 24" 2408WFP | Phillips 37" 1080p
Sapphire HD4870 X2 2GB
4GB Corsair DDR-2 1066 | Thermalrite 120 Ultra Extreme | G9 Mouse | G15 Keyboard
Vista Ultimate x64
SBSP
Registered User
Posts: 3124
Joined: 09 May 2006, 02:00
Location: Centurion

Post by SBSP »

PHR33K wrote:I dont see why people find C/C++ difficult. Its straight forward and simple.
its not difficult, its a waste of time.

I can believe that people still use C++ for application development.
Cure
Registered User
Posts: 237
Joined: 01 Jun 2007, 02:00
Location: Cape Town

Post by Cure »

C, C++, C# and java are basically very very simpiler so I guess it probably better to know one of them because its kinda easy to learn the rest (although java is complete OO but still its derived from C).
VB from the little I actually did is pretty good for your standard applications but C++ is far more functional.
PHR33K
Registered User
Posts: 779
Joined: 05 Sep 2004, 02:00
Contact:

Post by PHR33K »

Cure wrote:VB from the little I actually did is pretty good .
No.

Hell, next thing youre going to tell me is that MFC is good
Cure
Registered User
Posts: 237
Joined: 01 Jun 2007, 02:00
Location: Cape Town

Post by Cure »

I didn't say it was great I just said it was pretty good, its simpler then VC++ so for your basic windows applications its perfect, just like I said it's not all that functional, if it wasn't for the .net component I would have like it much it either.
Post Reply