User Profile

Collapse

Profile Sidebar

Collapse
macus
macus
Last Activity: Jul 24 '07, 04:52 PM
Joined: Jul 19 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • macus
    started a topic function return dynamic array data
    in C

    function return dynamic array data

    Dear All,

    I would like to write a small function which will return a dynamic array.
    The function is a simple function like this:
    Code:
    function_a(int a, int b)
    {
    }
    but, it will return a dynamic array values like this:
    peter 5 60.00
    mary 6 70.20
    ...

    How I do this in c++!? use function pointer ?? or other method !?
    Moreover, how can I get the return values...
    See more | Go to post
    Last edited by sicarie; Jul 23 '07, 01:04 PM. Reason: Code tags

  • macus
    replied to Read data from a file into array
    in C
    Could you mind to give me some example code!? I don't know how to use the vector.Thanks....
    See more | Go to post

    Leave a comment:


  • macus
    replied to Read data from a file into array
    in C
    It is a big problem, because every lines won't exceed 256 characters. But, the program will read every line data and put into the array. Since the date many be so long, I don't want to array to limit the size of the data storage array. How do I use it with pointers ?Thanks.
    See more | Go to post

    Leave a comment:


  • macus
    replied to Read data from a file into array
    in C
    What I need to correct if I want to use a pointer to access the array !?It is because I don't want to limit the size of the array.Thanks....
    See more | Go to post

    Leave a comment:


  • macus
    started a topic Read data from a file into array
    in C

    Read data from a file into array

    Dear All,

    I have 2 cvs file like this:

    <spec.csv>
    Type,sybType,ID
    CASH,ON,1
    FRA,1x4,2
    ...

    <data.csv>
    ID,Rate
    1,3
    2,5.23
    ...

    I want to read the files and put them into a 2D array. I am new to c++, pls help to give me some simple code to do this.

    The follow are some of my current code to read one csv file,...
    See more | Go to post
No activity results to display
Show More
Working...