Jump to content

C++ help


ashozzy2

Recommended Posts

hi

 

 

 

Im trying to learn c++ and im finding it very hard, so can anyone recocomend a book or online tutorial

 

 

 

This is my second language as i all ready know Visual Basic so please dont tell me to try and learn an easier language

 

 

 

many thanks

 

 

 

p.s i have visual c++ 2005 edition

Link to comment
Share on other sites

Visual C++ = Crap

 

 

 

I suggest you learn C. Either way, C++ or C use Gnu tools such as GCC and G++.

 

 

 

Try Wikipedia's wikibooks ..

 

 

 

Why is C++ so crap???

 

 

 

Is it because you do not understand how to script in object orientated programming languages? To be honest, C++ is one of the best, if not the best, type of programming language to use (coming from an avid Java programmer!), just because how powerfull it is. Also, C++ is the upgrade to C so it shows that it should be better then C!

 

 

 

i said that i already know visual basic i want to know the name of a good tutorial

Link to comment
Share on other sites

Lol, should have been more specific, i didnt really think abouit that fact lol. But my point is, not many companys do use java, because it is, well, slow.

yourmysin.jpeg

Current Goals

80/80 Fletching

60/75 Woodcutting

97/100 Combat

Link to comment
Share on other sites

C# is slow, nasty, lame.

 

 

 

Java will never match C++ in speed?

 

Why, because it's interpreted.

 

 

 

Why is it portable?

 

Any computer that can run a Java Virtual Machine can interpret .class files which are the medial form of a Java binary file (Between Source and Binary.)

 

This makes them slow. The only decent solution is using GCJ to compile Java straight into binaries. GCJ usually requires modification to the Java file's source code and must be on a GNU system.

 

 

 

Why do many companies not use it?

 

You can use a Java Decompiler such as JAD to decompile the .class files into source code. You can use a byte code editor to edit it in .class form. Even if obfuscated it's very possible to deobfuscate it and then decompile it.

 

 

 

IBM makes an excellent JVM, don't compare Java and any decent languages like C. =D>

Link to comment
Share on other sites

I hope your not trying to make a runescape cheating program :shame:

 

 

 

lol ive got better things to do than that and i hate cheaters. Some of my visual basic projects have been a scientific calculator some things to help me with my maths at school and my most recent is an encrypter/decrypter.

 

 

 

i just want to move onto c++ as ive heard its alot more powerful

Link to comment
Share on other sites

I said, Visual C++ the IDE/Compiler sucks.

 

The Visual C++ IDE/Compiler is the most commonly used tool for professional development for Windows. MFC/ATL, Developer Studio Macros, MSDN Library.... All the things that make professional development much easier than if you were using Dev-C++... Dev-C++ is used for minimal hobbyist development. Visual C++ is used for professional/industry-standard application development.

 

 

 

As for Borland C++... whats the point when you have to distribute those huge runtime libraries just so people can run your programs?

 

 

 

Thats why I think VC++ is the best IDE/Compiler out there...

Link to comment
Share on other sites

I hope your not trying to make a runescape cheating program :shame:

 

 

 

Making a runescape cheating program like a macroer or whatever in C would be HARD. Delphi is common. I know someone who used to help make these programs.

 

 

 

But anyway.

 

 

 

Learning VB was a bad idea. Never start programming in VB, ever. Its ok to learn VB after learning something else, but not as a first language. But I spose its a bit late now.

 

 

 

And dont use Visual C either. Microsoft languages suck loads, and they're Microsoft only, so they wont work on any platform.

 

 

 

For newbies, Python or Perl are good. After that, C is good, and after that, Java. I found java horribly complicated even with a simple Hello World program.

 

 

 

I would personally recommend you learn Perl, then C or C++. C is more powerful, but C++ is easier (only marginally, though).

 

 

 

PHP is good as a first language. Its not technically a programming language, but it has a nice C-like Syntax that will get you used to good programming. VB is not a nice language. Its completely different to everything else, and therefore moving to another language is different.

 

 

 

Here's a few code examples to show you some of the Syntaxes of two of the langauges i have mentioned. This is the 99 bottles of beer on the wall program. It outputs the entire 99 bottles of beer on the wall song, all the way from 99 to 0. I did study python for a while, but I forgot half of it :S

 

 

 

(For those who know what you're talking about, yes, i know i could use for loops, but i hate them. I prefer do-while loops.)

 

 

 

PHP

 

<?php



$bottles = 99;



while (bottles > 0)

{

echo $bottles . ' bottles of beer on the wall, ' . $bottles . ' of beer. Take one down, pass it around, ';



$bottles -= 1;



echo $bottles . ' of beer on the wall.
';

}



echo 'No more bottles of beer on the wall!';



?>

 

 

 

C++

 

#include 



void main(void)

{



int bottles = 99;



do {

cout << bottles << ' bottles of beer on the wall, ' << bottles << ' bottles of beer. Take one down, pass it round, ';



bottles -= 1;



cout << bottles << ' of beer on the wall.\n';



} while (bottles > 0);



cout << 'No more bottles of beer on the wall!';



return 0;



}

 

 

 

Python

 

#!/usr/bin/python



bottles = int(99)



while bottles > 99:

    print str(bottles) +  ' bottles of beer on the wall, ' + str(bottles) + ' bottles of beer, take one down, pass it around, '

    bottles -= 1;

    print str(bottles) + ' of beer on the wall\n'



print 'No more bottles of beer on the wall!'

 

 

 

Theres some examples for you. I personally hate the syntax of Python. I do like curly brackets and semicolons rather than tabs and linebreaks, but some people like the syntax.

 

 

 

I would recommend that you learn Python first. I imagine you probably like the syntax more just from my example because it does bear some similarities with VB, but also many similarities with C, and it was designed to be easy, too. As well as that, Python can be used for web scripting. Thinkgeek.com's shopping cart uses Python scripting.

 

 

 

I hope this helps.

tipitsig2gn.gif
Link to comment
Share on other sites

Although very outdated I won some awards back in the day for my tutorials - You can view these by clicking the following link. http://pscode.com/vb/scripts/BrowseCategoryOrSearchResults.asp?txtCriteria=michael+skelton&blnWorldDropDownUsed=TRUE&txtMaxNumberOfEntriesPerPage=10&blnResetAllVariables=TRUE&lngWId=3&B1=Quick+Search&optSort=Alphabetical

 

 

 

Personally, I'd learn Objective C (and this is coming from a full time programmer)...

codbar.jpg

4wmbar.jpg

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.