Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
13
Posts with Upvotes
10
Upvoting Members
2
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
~2K People Reached
Favorite Forums
Favorite Tags
c x 13
c++ x 9
Member Avatar for kimw

does anyone know how I can write to a xls that puts each number in different cells? for example, [CODE]vector<int> nums; nums.push_back(1); nums.push_back(2); nums.push_back(3); ofstream myfile; myfile.open("C:/example.xls") myfile << nums[1] << " " << nums[2] << " " nums[3] << endl; myfile.close()[/CODE] how do i put three numbers in different …

Member Avatar for Salem
0
121
Member Avatar for kimw

can anyone offer performance tips to improve the running time ? this function opens a file (a 7000 row by 30 col), and stores each elements in a matrix data . current running time is 4 sec, and i desperately need to minimize the running time as i need to …

Member Avatar for kimw
0
84
Member Avatar for kimw

I would like to implement a function similar to the math function from excel, that is, given a vector and a value in the vector, return the relative position of that value in that container. However, my code [CODE]vector<double> vec; double x = 25.0; int pos = 0; for (int …

Member Avatar for Ancient Dragon
0
96
Member Avatar for kimw

hi i have a function that opens a file and store the data into a matrix [CODE]void openfile(vector<vector<string> >& data, string path) { ifstream inFile; inFile.open(path); ....[/CODE] this does not work but it works when i eliminate the path as input [CODE]void openfile(vector<vector<string> >& data) { ifstream inFile; inFile.open("C:\file.csv"); ....[/CODE] …

Member Avatar for kimw
1
149
Member Avatar for kimw

does anyone have problem with linking to newmat library ? running [CODE]#include "newmat.h" int main() { Matrix A(2,2); }[/CODE] i got linker error: undefined reference i'm using dev c++ and have set the directories to point to the file where i stored all the header and source files .. any …

Member Avatar for ~s.o.s~
1
97
Member Avatar for kimw

does anyone know where i can find a library for minimizing a function, given a set of parameters and contraints? (similar to Solver in Excel) i've searched around and found quantlib/solvers1d but am still at a lost of how to use it .. any help is appreciated, regards,

Member Avatar for kimw
1
179
Member Avatar for kimw

i have a string that i want to convert to double. i know atof is a standard library function for that, however, the input argument to atof is (const char*), not string type that i have. does anyone know how i might convert my string num to double ? thanks …

Member Avatar for Dave Sinkula
2
291
Member Avatar for kimw

i am a little bit confused about the actual usage of the find function of map i have say a vector<string> and i want to return the relative position (or iterator) of a key (of type string) in this vector. now, the find function accepts only one input which is …

Member Avatar for Grunt
1
137
Member Avatar for kimw

i am trying to use a boost library [CODE]#include "boost/date_time/gregorian/gregorian.hpp"[/CODE] and my source file is in the same folder as boost. however, during compilation i get errors that directories that gregorian.hpp links to (boost/date_time/compiler_config.hpp) could not be found. i've checked that all the files that gregorian.hpp links to are in …

Member Avatar for Salem
0
221
Member Avatar for mym

I need help with finding the minimum value of x but I can't seem to get the code right. Please Help. Noob :sad: [code] #include<iostream> using std::cout; using std::cin; int main() { int x; // x is the duration of the call double sum; int number; double average; sum = …

Member Avatar for kimw
0
190