for (n, n<= size*size, n++) You sure you want to do this? Just a suggestion, but start with a 3X3 array to see if you have the code working properly
Type: Posts; User: kcpilot
for (n, n<= size*size, n++) You sure you want to do this? Just a suggestion, but start with a 3X3 array to see if you have the code working properly
your "naming convention" for functions needs some help. Try naming your functions starting with a letter, like "my_1()". I doubt if this program even compiles, much less execute.
And I agree with...
Take another look at the strtok function. I believe you have to use it twice to make it work the way you want. There should be shown an example in a decent book on 'C' in the 'String and Character...
First off, this is NOT a 'C' function. This is a UNIX function to be used on particular UNIX versions. So if you need help on 'wprintw' I suggest you do the following at the command prompt: man...
First, * 1 2 3 ... are really numbers, you have to print this line as characters, OK? When you are printing out your rows, that first entry is not a number, but again, a character. Think of it as...
I'd find a new career, because if your mind wanders when trying to program at this level, you won't make when the heavier programming comes along.
Any decent 'C' book will provide you all the answers you seek here. You should already have one if you're taking a class in 'C'.
This isn't the Java forum --- it's 'C', even though the statements would be the same. So you're going to run a loop from 1 to 100 and test to see if that number in that loop is evenly divisible in...
It only runs ONE TIME. You need to add a third option of telling it when to quit and then use a WHILE statement or a DO-WHILE until that third option is used. You can put that third option in the...
Your line :
if ( argc != 'E' || argc != 'e' || argc != 'D' || argc != 'E' )
is checking 'E' twice. Should it be checking some other value??
I may be wrong, but if memory serves me correctly, the rand() function may not be returning the type of values you think they are. I know I've found occasions where the value returned was a double...
Try working out your formulas on paper --- you will see they are bogus. It might help if you defined your constants better. Instead of "POUNDS" doesn't something like "OZ_PER_LB" sound more accurate?...
Area is PI * r * r not PI * Diameter * Diameter
For one thing, struct scene DOES NOT contain an 'obj', so your 'scene[0].obj[0].numobj;' is completely bogus.
To do what you want to do, you would have to include the structure 'object_list'...
You will not get the correct answer for an average until you make :
int grade1;
int grade2;
as
double grade1;
double grade2;
BINGO, you answered your own question!
Computer problems, eh? How did he manage to post this thread? Copy and paste didn't work? He didn't reel in Tabstop either! No integrity with this poster at all!
Take a look on zdnet.com for software that adresses memory leaks. You can do a search fo "memory leak" and see what turns up. Be prepared to spend money. I doubt if you will find a very good one for...
Why even use float variables. You're using pennies to calculate the types of coins. You can't have a fraction of a penny. You'd also be better off not declaring your variables inside of "if" blocks....
A couple of things --- first you never increment 'i' at the end of the do-while loop. Also, you never initialize your studentPtr. The statement
...
For a beginner in 'C', I think you are biting off a whole lot more than you are ready for. Start with simpler stuff for now and work your way up the knowledge ladder.
Does this compile on your system? It doesn't compile on my VC++ 6.0.
First of all, the number of arguments you are trying to read in from the input file do not match what your example shows --- where does 'totalnumdays' come from in the input list??
I think a...
It's bad programming practice to do that, but if you really want to do it and suffer any consequences thereof, you can 1) make one include file and use it in your program, or 2) you can list each...
So what does your new code look like now? You had no code to change the values of anything in your array. If you enter a '4', you are setting numbers[4] to something close to 10000. since you are...