By using this site, you agree to our Privacy Policy and our Terms of Use. Close

Forums - General - How difficult is C++???

I've been a developer for nearly 20 years, and C++ is the one language I have tried to avoid as much as possible. I do know how to program in it, but prefer not to, since it's so easy to write really bad C++ code, and if it's possible, the average developer will do it, and I don't want to maintain their crap.

C++ without OOP is simply C with slightly stronger type checking. You can't honestly say you're a C++ programmer unless you know how to do OOP, and that doesn't mean knowing how to call some methods.

C# is more like Java than C++, but without the portability that Java has. Java has exceptional third party support and open source library support and is my current preferred high-level language, but I still do a lot of Delphi (Pascal), x86 and Z80 assembler.



WinAPE - The Windows Amstrad Plus Emulator

JEMU  - The Java Emulation Platform

Around the Network

C# or Java are fine for learning - but anyone wanting to do games needs to learn C, then C++ (basically extended C - with objects) - then Assembler if they want to go "hard core".

I have never used C#, and never seen a games studio that didn't use C or C++. Using Java a lot at the moment (mobile space), as well as my own (designed) script language (which is 95% like C syntax).

In the end, its all about understanding. Even using Java blindly doesn't help - you need to understand how the virtual machine handles allocation, what can lead to fragmentation and a lot more (to be a "good" programmer).

Probably 95% of my coding is all "lightweight" C++ - that is C++ with objects, but not taken to insane levels (avoiding multiple inheritance, polymorphism, etc...).

The more you code, and the more you expose yourself to - the better you get. That's about it.

Oh yeah - and if you want to be REALLY hard core - do LISP :). Something I haven't gotten even close to mastering yet...



Gesta Non Verba

Nocturnal is helping companies get cheaper game ratings in Australia:

Game Assessment website

Wii code: 2263 4706 2910 1099

^ What's LISP??? And how hard is it to do OOP???



 

This is LISP: http://xkcd.com/224/ 



A few years back I was bored at work and thought about what would be the easiest game to make that would be somewhat playable. I did a simple game where you had to click random placed and sized squares as fast as possible. It took me a few minutes in C++ Builder.



Around the Network

LOL I forgot to add some codes to my program while making the number guessing game and guess what happens??? Here, compile and run this on any C++ platform...LOL it's funny..

#include
using namespace std;
int main(void)
{


double dnumber;
double danswer;



cout dnumber ;


if (dnumber == danswer) ;

cout



 

How do I make the computer choose a random number? I put down
srand{static_cast{time{0};

BUT IT DIDN'T WORK!!!



 

BUMP....Uhhh...HELP



 

srand() just seeds the random number generator.  You then need to use rand() to actually obtain random numbers.

Here's a reference: http://www.cplusplus.com/reference/clibrary/cstdlib/rand.html 



Uhh..I did everything....Here, I'll put in the important part of the code:

while(true);
{

system("CLS");
cin.clear();
iguesses = 0;


srand{static_cast{time(0)}} ;
iCookies = rand()%1000+1;