Any c++ programmers on here?
#1
Scooby Regular
Thread Starter
Join Date: Aug 2003
Location: Epsom
Posts: 5,832
Likes: 0
Received 0 Likes
on
0 Posts
Any c++ programmers on here?
Trying (unsuccessfully) to write a simple c++ app to read in some data from a csv file into an array of floats, do a few sums on them and output the data.
HOW HARD CAN THIS BE FFS!
Rather than post the code up here, can anyone who can help let me know and I'll do it offline.
Thanks
HOW HARD CAN THIS BE FFS!
Rather than post the code up here, can anyone who can help let me know and I'll do it offline.
Thanks
#2
Scooby Regular
Join Date: Mar 2001
Location: Derbyshire
Posts: 4,496
Likes: 0
Received 0 Likes
on
0 Posts
Hard to know exactly what you are having a problem with, but make use of the ifstream to read in the csv file in a std::string, then tokenise it by using the comma as a delimeter. Then either dynamically allocate an array, or make use of vectors or other container classes, to store each separate value, and then iterate through the container/array to do whatever you want with the data.
Depends how familiar you are with C++, which compiler and framework you are using, etc.
Depends how familiar you are with C++, which compiler and framework you are using, etc.
#3
Scooby Regular
Thread Starter
Join Date: Aug 2003
Location: Epsom
Posts: 5,832
Likes: 0
Received 0 Likes
on
0 Posts
BIG Thanks to Steve for helping me with my code problem - turns out some dodgy data was responsible.
Steve was really helpful - the power of Scoobynet is amazing
Steve was really helpful - the power of Scoobynet is amazing
Thread
Thread Starter
Forum
Replies
Last Post