They do the same thing. They store a string. Use OO as a tool.
This debate isn't worth discussing. Forums continue to prove it's just people babbling back and forth and following the leader. Good...
Type: Posts; User: dxfoo
They do the same thing. They store a string. Use OO as a tool.
This debate isn't worth discussing. Forums continue to prove it's just people babbling back and forth and following the leader. Good...
Anyone who works professionally knows why this is important to understand. When you get a career in programming you'll find ancient code written like this perhaps for an older compiler. The world is...
I think checking the compiler's documentation is the best bet on a null pointer. But it wouldn't hurt adding a condition some programmers expect, just for the sake of not getting into this arguement....
Can't argue there. Thanks!
p_stck is the dynamic array.
If I'm understand that right, it's always good to check for null before freeing then just to be on the safe side.
I come from a C++ background where 'delete' was different if you're working with an array of memory. With free(), does it delete the array automatically?
#include <stdio.h>
#include...
That's another one - good!
A really good book that helped me go from C to C++ was C++: The Complete Reference, 4th Edition. The first section is C89 since it's a base document for the C++ standard, so it examines that first....
Well it's a C99 header, so it depends on the compiler. The one I'm using doesn't contain stdbool.h.
hahaha. Interesting how it still compiles without the header.
Just having fun with this... What's wrong with this code while compiling on a C89 compiler?
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
add(a, b)
int a;
I get it now. I'm passing an address to the function. The formal parameter contains the address. So I don't have to specify '&' again. If you do it can do bad things!
Oh, I got it. I don't get it though.
I changed
fread(&p_Actor, sizeof(ACTOR), 1, fp);
to
fread(p_Actor, sizeof(ACTOR), 1, fp);
The PC object is passed to Actor_Load() as a reference....
This code saves an actor to a file. After modifying the age, I load the actor back from file. What's strange is it still has the modified age. I would expect it to be 28 again? Edit: The loading...
Got it. And nice to meet another Portlander!
Makes sense. I guess it's in the C spirit too :)
For several years I've been use to the single ('//') comment line in C++. I know in C89 this isn't standard, but it is in C99. Is it common to use it anyway? Is it widely portable? Thanks.
Looks like another book I'll have to read :)
Agreed, I thought I was alone on this. Personally I would like to see a professional site where you have to prove a track record of completing a game or two before becoming a member of the forums....
Ah, yes... my mistake. But seriously, work on the attitude. Some of us come from a professional background and looking at your post just sounds really amateur and rude.
Adding you to my be aware / PMS developer list.
And there is no such member for the structure I'm using. Read on and get some pills.
For extra info, I'm getting '0' for osInfo.dwPlatformId.
I'm trying to detect a user's OS but I'm not getting the correct results. Is there something I'm missing?
OSVERSIONINFO osInfo;
// Get Windows version.
ZeroMemory(&osInfo,...
Interesting. Are there any books or tutorials that teach this in depth? Aka map designing or similar.
I didn't know Eye of the Beholder would be considered research after all these years. But I'm curious how they designed the maps. It might help for a near future project.
Is this how it's...