Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~4K People Reached
Favorite Forums
Favorite Tags
Member Avatar for nocloud

I have a the following snippet of code [CODE]string const& symbol::at(int index) const { assert(index<symbol_data.vector::size()); return symbol_data.vector::at(index); }[/CODE] This does not compile successfully, instead, I get complaints about [CODE]error: ‘template<class _Tp, class _Alloc> class std::vector’ used without template parameters[/CODE] Now, I think this has something to do with the fact …

Member Avatar for mrnutty
0
323
Member Avatar for nocloud

I am experiencing unexpected performance degradation when using vectors with classes. I have a csv_File class that reads in a csv file and stores the contents in a 2D vector. There's a member function that allows access, e.g. [CODE] csv_File file("file.csv"); file.access(2,2);[/CODE] To access the 2,2 element. Then, I have …

Member Avatar for mike_2000_17
0
183
Member Avatar for nocloud

I have a number of functions I would like to reuse in multiple pieces of code. I have put these into a single header file that looks something like the following: [CODE] #ifndef FUNCTIONS_H #define FUNCTIONS_H //function prototypes extern float sum(vector<float> &v); //calculate sum of a vector float sum(vector<float> &v) …

Member Avatar for Schol-R-LEA
0
413
Member Avatar for nocloud

I have a class that looks like this [CODE] //the mem_data class======================================// class mem_data { public: mem_data(int,int,std::string); ~mem_data(); private: std::vector<reader> mem_store; int complete; friend class model_base; }; [/CODE] Now, I would like to let the class model_base access mem_store My main code will contain the following: [CODE] mem_data test_data(20110601,10,"test_file.csv"); model_base …

Member Avatar for nocloud
0
947
Member Avatar for nocloud

I have a custom date class that is constructed in the following way: [CODE] date date_file("dates.txt"); [/CODE] I want to put this object into a new class as a private member, e.g [CODE] //the mem_data class======================================// class mem_data { public: mem_data(int,int,std::string); ~mem_data(); private: std::vector<reader> mem_store; int complete; date date_file; }; …

Member Avatar for mike_2000_17
0
272
Member Avatar for nocloud

I've been scratching my head for quite some time with the following compilation error and I was hoping somebody could shed some light... I have the following in my header (.h) file: [CODE] //the mem_data class======================================// class mem_data : public reader, public date { //multiple inheritance public: mem_data(int,int,std::string); ~mem_data(); private: …

Member Avatar for caut_baia
0
378
Member Avatar for nocloud

I currently have two C++ programs. Program1 takes some input and prints to screen a float. I can get Program2 to call Program1 using something like: system("./program1 input"); Currently, Program1's output goes to screen. Is it possible for Program2 to read Program1's output and use it? The only way I …

Member Avatar for Ancient Dragon
0
89
Member Avatar for nocloud

I am getting the following error message: terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check Aborted It appears that I'm trying to read past the end of a vector somewhere in my code. The error message doesn't give me a whole lot of information about where the problem …

Member Avatar for StuXYZ
0
779
Member Avatar for nocloud

I am having a most mysterious problem which I have been unable to solve after repeated attempts. Perhaps somebody here will be smart enough to figure out what is going on. I am attempting to read a file of this format 19700326.15 71.37 71.50 70.00 70.50 217600 0.89 19700330.15 70.50 …

Member Avatar for Frederick2
0
580