That one didn't work either |
|
That's because your syntax isn't quite right. Try this: |
|
That one didn't work either |
|
Ninja, |
|
Yep, C code runs circles around VB code. |
|
Okay so I've started writing my own 3D engine in C++.. it's got a terrain engine and lighting.. ect. How do I take all my classes and turn it into a library? So like i could be like DDHI_MakeTerrain(..) rather than being like including the classes and calling MakeTerrain(..) Basically.. i could wrap up all my classes and import them all using a single .lib and use it throughout other programs i write using those classes? |
|
From every time we meet, to every time we part, i will add another memory to my shattered heart, and for every dream we chase, another memory will take its place, so we can remember it one day.
LD's 15
DILDs 14
WILDS 1
It depends on your platform and compiler. |
|
Last edited by ninja9578; 07-11-2009 at 12:17 AM.
Not really, it's fairly compressed. There is some overhead, for instance, strings have about 4 levels of abstraction around then so every string manipulation requires about 4 times the work as in C++. VB is designed to be a learning tool, not a professional programming app, so the compiler is not very efficient at optimizing. |
|
"The C Programming Language" |
|
I can still remember compiling "Hello World" for lulz in the old QB 4.5.. 14 Kb for: print "Hello World!" |
|
Good for you. I grew up with some less than optimal machines and I got really good at doing optimizations, I still do it. Qbasic was fun |
|
How do you find the execution time and memory imprint of your code? |
|
April Ryan is my friend,
Every sorrow she can mend.
When i visit her dark realm,
Does it simply overwhelm.
Your memory imprint should be visible in your Task Manager (ctrl+alt+del) |
|
I've always been interested in learning C/C++, but could never find any good reference/learning sources. |
|
This question is more programming in general but still applies to C. |
|
The only major change in programming fundamentals is the emphasis on cross-platform programming. The skyrocketting sales of Macs made companies rethink how they designed software since more and more companies were demanding Mac-friendly apps. Because OSX is UNIX based, a side-effect of that was a surge in Linux programming. |
|
where can I find a good free C++ compiler that I don't need to register? |
|
If you decide that something is beautiful
then something else immediately becomes ugly
without you realizing it
-Lao Tzu
Seemingly the bough is the cause of the fruit,
But really the bough exists because of the fruit.
-Rumi
Most C++ compilers are free, ones that you have to pay for are a scam. The standard is GNU, which is 100% free. |
|
If you're on windows and don't want an IDE, just a compiler, then you can download mingw. I'm guessing that's the compiler Code::Blocks use. |
|
April Ryan is my friend,
Every sorrow she can mend.
When i visit her dark realm,
Does it simply overwhelm.
Yes, C++ is a superset of C, so knowing C will be good for C++. |
|
April Ryan is my friend,
Every sorrow she can mend.
When i visit her dark realm,
Does it simply overwhelm.
It depends on what the application is. Huge applications use C++ because it's easier to write object oriented programming. C has a major advantage of speed though. Games and graphics programs are largely written in C and will be until the C++ optimizers can rival human C code in speed and efficiency. |
|
The other day I started wondering how scripting language interpretors are implemented. As I recall you've written quite a few of them. Do you think you could give me the general idea? |
|
April Ryan is my friend,
Every sorrow she can mend.
When i visit her dark realm,
Does it simply overwhelm.
Well, they're surprisingly simple. They are two parts, a parser, and a runner. The parser converts them into a vector (I use a vector, could be any container) of strings. Then have a compiler which converts them into more optimized code using callbacks and such. So: |
|
Bookmarks