Search:

Type: Posts; User: tomelk31

Search: Search took 0.00 seconds.

  1. Replies
    4
    Views
    860

    I have solved the problem. Thanks

    I have solved the problem. Thanks
  2. Replies
    4
    Views
    860

    Cheers for the replys. The function should have...

    Cheers for the replys. The function should have the prototype int NoOfChars()
  3. Replies
    4
    Views
    860

    Reading from a file

    Hi

    I am trying to read a file and then print out information about that file using a function.

    Here is the code i have so far:



    #include <iostream>
    #include <fstream>
  4. Replies
    7
    Views
    7,485

    That's what i was thinking. It prints out like...

    That's what i was thinking. It prints out like so:

    rand[0] = floating point number 1
    rand[1] = floating point number 2
    rand[2] = floating point number 3
    rand[3] = floating point number 4

    I...
  5. Replies
    7
    Views
    7,485

    Hi, Thanks for the reply's have I have...

    Hi,

    Thanks for the reply's have I have divided the rand() by a constant and it seems to work well. My question now is how can I access the array. would the array be rand[]?
  6. Replies
    7
    Views
    7,485

    Random array generator for floats

    Hi. I have come up with this for a random array generator for integers, but i can't seem to get to get it to work with floats. I changed some of the variables to floats but it didn't work. any ideas?...
  7. Replies
    7
    Views
    1,106

    here is the code void sort(float* array,...

    here is the code




    void sort(float* array, int length)
    {
    . . int i, changed;
    . . float temp;
    . . changed = 1; // assume we changed something
  8. Replies
    7
    Views
    1,106

    Printing out something from a function

    Hi

    I am a newbie to C. I have a function which search's through numbers. How can i output one of those numbers? I know you have to use printf and place that in the main part of the program. When i...
  9. Replies
    6
    Views
    1,318

    That has worked thanks.

    That has worked thanks.
  10. Replies
    6
    Views
    1,318

    Ok thanks for the reply. So if you have to...

    Ok thanks for the reply.

    So if you have to define the size of maloc array then how can you have undefined array size?

    I am new to C and still learning thanks.
  11. Replies
    6
    Views
    1,318

    Hi Thanks for the reply. I have seen the maloc...

    Hi

    Thanks for the reply. I have seen the maloc function when searching google but have no idea how to use it.
  12. Replies
    6
    Views
    1,318

    Dynamic Array's

    Hi

    I am looking to implement an Array where the size doesn't have to be stated.

    At the moment i have:




    int num [8] = {76, 13, 14, 1, 55, 33, 24, 65}
Results 1 to 12 of 12