Thanks a lot! I remember when I just began programming I heard about this, but they told me that it was bad programming practice to use it. I guess it was meant for this type of thing. Thanks again...
Type: Posts; User: purestr999
Thanks a lot! I remember when I just began programming I heard about this, but they told me that it was bad programming practice to use it. I guess it was meant for this type of thing. Thanks again...
Hello, I am having this problem which keeps reoccurring during programming.
In a class, for example, FloatArray I want to make a function
float average(int from, int to); that to the user,...
Hi, thanks for the help!
@CommonTater - The problem with the example you wrote is that if you used those files inside a bigger project, and someone else wrote his own function called flubstuff, then...
Hi,
I started making a large project in C, and I realized that I need some useful functions that I made in multiple .c files, but, I don't want the user of my files to be able to use those functions...
Wow thanks for the fast replys, I'll check out Gprof.
Will the Performance wizard in visual studio 2010 ultimate help me?
@007: What exactly do you mean rewrite it in C? I can't make this program...
Hi, I am new to C++ and OOP, I entered a contest in which we must make a program that will play a board game against other players programs, and I want to speed up my program. File size does not...
This was the problem lol :P changing "w" to "wb" fixed it. What exactly does the b mean?
You guys are all saying that when I have an array ary[5][10] then ary is a array of 5 pointers, and each...
From my understanding, the name of an array itself is a pointer to its first number, and it is fine to put it into a function that wants a pointer.
I tried doing:
double *arr = array;
or
double...
Here is the problem: I need a way to store large amounts of data (e.g. tables of doubles) in a file and to be able to read the data.
I created 2 types of save files.
One is a .txt file
benefits...
can someone tell me how to change the settings so that my files are compiled in C? I am using GNU GCC in codeblocks but stuff compiles in C++
I am using windows 7 with codeblocks 8.02 which I downloaded and installed a couple weeks ago. I didn't change any settings.
I ran your code, and it says compiled in C++.
By the way, I found...
I am using Codeblocks, with GNU GCC compiler.
And I have both the programs open in different tabs, but one compiles, and the other doesn't!
I think that maybe the working program I copied from...
I am getting casting errors.
error: invalid conversion from 'int' to 'country'
and
error: no 'operator++(int)' declared for postfix '++', trying prefix operator instead
error: no match for...
I made 2 programs, each both use only <stdlib.h> and <stdio.h>.
I can't find any important differences in them. In the first one I did simple math problems with enum things, and it worked fine, but...
@Bayint Naung yeah I added math.h without it pow() wouldn't of worked I guess.
@painorain sorry I forgot to add that, yeah those are all ints.
@grumpy ok thanks for the explanation, now that...
Hi, I am new here and starting to learn C. I got stuck on this math problem though and I can't find a way to figure it out.
Here is the relevant code:
int i,i2,i3,i4,i5,i6,i7;
for(i=1;i<=10;++i)...