166 Posted Topics

Member Avatar for AbEeR Q8

What is the problem you're having? Are you getting freezes? NULL-pointer access? Just some general crash? Is it not compiling?

Member Avatar for raptr_dflo
0
390
Member Avatar for tyricec

You're trying to set GLPoint P, Q, R, and S to just a set of numbers in parenthesis, and your compiler doesn't know what to do with that. You're going to have to make an intializer list of setting these, or if you want a quick and dirty method of …

Member Avatar for Tumlee
0
576
Member Avatar for v_janssens

I know that running a program through an environment such as Visual C++ or CodeBlocks will automatically set the working directory to whatever you choose, if you set it up correctly. Your IDE is probably set up to always run your Debug program straight from the /bin/ folder, but when …

Member Avatar for Tumlee
0
409
Member Avatar for geosparovany2

It looks like Python is more similar to C++ than Perl. Perl has some strange syntax that allows [I]if[/I] statements [I]after[/I] the command, and it appears that a lot of variables in perl don't have any real typing, and it varies with how you use them. Python is syntatically more …

Member Avatar for Tumlee
0
231
Member Avatar for DeusManP0W

You mean like converting a character into a usable input? Like pressing 'Q' to get "Quit game" and whatever? My knowledge of <stdio.h> is better than my knowledge of <iostream>, so I'm sorry if it seems too oldschool. [code=C++]char input = getchar(); if(tolower(input) == 'q') { //Code to quit game …

Member Avatar for DeusManP0W
0
213
Member Avatar for shaneos

You're going to have to swap each string manually, character by character, if you're going to want this to work.

Member Avatar for Smeagel13
0
114
Member Avatar for Tumlee

I'm a rather experienced, self-taught C/C++ programmer. I go by the name Tum in other places and I am involved in SDL game design. I am happy to help people with their coding problems when I can.

Member Avatar for Onlineshade
0
69
Member Avatar for C++newbie chick

On all of those cases where you commented "to be filled", you should put a "break;" statement after each one or you're going to get problems later on.

Member Avatar for C++newbie chick
0
324
Member Avatar for ayeshashahid

Are you sure it's your *compiler* that's crashing? Or is your program crashing during execution? If it's the latter, it's more than likely that "r" is pointing to invalid memory or "r" is a NULL pointer.

Member Avatar for ayeshashahid
0
166
Member Avatar for corby

The main() function is not allowed to be called inside a program. As far as I know, this means no function pointer is allowed to point to it either. I'm sure your results may vary from compiler to compiler. The only sure way is to try it yourself.

Member Avatar for Narue
0
144
Member Avatar for IndianaRonaldo

More than likely, it's just because printf() and scanf() are functions that have been around since before C++ and if you were to disallow that suddenly, it would cause older code to no longer compile correctly. Plain vanilla C didn't have all the type-safety that C++ had, and IIRC enum-int …

Member Avatar for Tumlee
0
1K
Member Avatar for Nawaf15

The pow function takes two doubles. x and y were declared as integers. When you put two integers in the pow function the compiler doesn't know what to do. You have two choices. You can either declare x and y as type "float" or "double" instead of "int", or you …

Member Avatar for raptr_dflo
0
411
Member Avatar for Hoff123

Game Maker is actually pretty slow and inflexible, but I guess that's the tradeoff you have to deal with for ease of use. I've had to deal with Game Maker myself when I was making amateur games and even their built-in collision detection functionality was broken for objects that moved …

Member Avatar for Tumlee
0
294
Member Avatar for yurigagarin

As long as that part of the input will always be a single character, yes, you will be able to do that. Also, if you want to make your code shorter, I believe fscanf returns the number of arguments filled, so you could fill multiple data element with a single …

Member Avatar for yurigagarin
0
1K
Member Avatar for eman 22

<string.h> is a C-compliant headers that provide functions for comparing, copying, and doing other things to arrays of characters (For example, "char* foo" or "char buf[128]"). strcmp(), strcpy(), and whatnot are included from there. They actually don't do anything with the "string" class. <string> is for C++, and that is …

Member Avatar for Tumlee
0
152
Member Avatar for WoBinator
Member Avatar for Zacadx15
0
501

The End.