Search:

Type: Posts; User: purestr999

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    1,140

    Thanks a lot! I remember when I just began...

    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...
  2. Replies
    4
    Views
    1,140

    Problem With Const Correctness

    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,...
  3. Hi, thanks for the help! @CommonTater - The...

    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...
  4. How to share a private function between multiple .c files?

    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...
  5. Replies
    8
    Views
    3,033

    Wow thanks for the fast replys, I'll check out...

    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...
  6. Replies
    8
    Views
    3,033

    How to Speed Up My 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...
  7. Replies
    10
    Views
    6,323

    This was the problem lol :P changing "w" to "wb"...

    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...
  8. Replies
    10
    Views
    6,323

    From my understanding, the name of an array...

    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...
  9. Replies
    10
    Views
    6,323

    Storing data in file

    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...
  10. Replies
    8
    Views
    5,241

    can someone tell me how to change the settings so...

    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++
  11. Replies
    8
    Views
    5,241

    I am using windows 7 with codeblocks 8.02 which I...

    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...
  12. Replies
    8
    Views
    5,241

    I am using Codeblocks, with GNU GCC compiler....

    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...
  13. Replies
    8
    Views
    5,241

    I am getting casting errors. error: invalid...

    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...
  14. Replies
    8
    Views
    5,241

    Problem with enum

    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...
  15. Replies
    13
    Views
    8,632

    @Bayint Naung yeah I added math.h without it...

    @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...
  16. Replies
    13
    Views
    8,632

    Math problem with pow()

    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)...
Results 1 to 16 of 16