C++ Trainer Skeleton

Posts 31–41 of 41 · Page 3 of 3
Quote Originally Posted by shercipher
I hate to break it to you, that is typical C. But not because of the reason he provided, because you can use printf() in both C and C++.

But there is nothing C++ specific in there; no references, classes, object orientation, or instantiation. In other words, it is C, because you can plug this code into an ANSI C compiler and it would still run.

And C# has nothing to do with this; in fact that is incorrect C# syntax.

EDIT: And by the way, both C and C++ use the same header include system.
This is a telltale sign of C:

#include <stdio.h>

This is a telltale sign of C++:

#include <iostream> //note there is no .h
using namespace ...; //C does not use namespaces
He's kinda' right...if it were C++, it would have a prefix in the header for example

C code:

#include <stdio>


C++ code:

#include <cstdio>
Prefix's have nothing to do with being coded C or C++, hes talking about suffix... Hence the .h, but as I mentioned it depends on usage.
C/C++ has a very fine line. A rule of thumb is that C++ is just an object oriented extension of C, so if you see anything object oriented (ie a class, inheritance, instantiation, or namespaces) you can assume with 99.99% certainty it is C++.
Quote Originally Posted by shercipher
C/C++ has a very fine line. A rule of thumb is that C++ is just an object oriented extension of C, so if you see anything object oriented (ie a class, inheritance, instantiation, or namespaces) you can assume with 99.99% certainty it is C++.
#include <iostream> //note there is no .h
Not the same thing. And that is a no brainer.
Look - I'm not trying to argue. I am telling you though C++ is just stuff built on top of C. It isn't downwards compatible - a pure C compiler doesn't know wtf a class is - but that code IS pure C compatible.

If you doubt me so much I will take the time to get Pelles C (C only compiler) and run that code for you, just to prove it works. Anything that is C is C++; but anything that is C++ is not C (think of it like square and rectangle).
If you learn C#, you will be able to program in J#, Java, and ASP.net, or any .net framework language. And that can be applied to any of those stated, learn java and you can easily grasp the others.
im actually developing a new coding language anyone got sugestions for a name?
Yeah, call it SWYAA, short for Stop While You Are Ahead. If you're on a game cheating forum asking for a name for your programming language, chances are it won't take the world by storm.
... Lmao, I don't think anyone is saying it isn't...
my friend cosmiccomie is going to learn how to use c ++ programs from his mom! oh! But his mom is a computer genuis and will teach him everything he will need to no.....unfair....
Off topic but -

"one shot, three kills"

ROFLMAO.
Posts 31–41 of 41 · Page 3 of 3
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?