No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Hi, not so much into software design patterns [further - SDP], so while learning this "thing" i have some issues with trying to combine multiple SDP. I think that there are some logical issues.. Thank you for your time! :) [CODE] #include <iostream> using namespace std; /*the Command interface*/ class … |
|
Hi, there is that thing that i need to handle atoi () function error.. Now for explanation atoi ( some const char * which is int (like '1') ) gives me that int, but if i write like this atoi ( 'n' ) then shit happens and it return's a … |
|
Hi, new to vectors.. I have a little problem with them - with arrays you could just do like array [ index ] = new value, and everything is ok. How it is with vectors ? how can i change specific index value ? |
|
Hi, after making some adjustmens to my code as recommended, I get those discard qualifiers errors.. [CODE] //pentathlete.h #include <iostream> using namespace std; template < class T > class pentathlete { protected : T comp_res [ 5 ] ; public : T sum_res ; pentathlete ( ) { for ( … |
|
Hi, i have some issues with class inheritance and i do not know how to solve it, maybe someone could help me with that ? [CODE] //pentathlete.h #include <iostream> using namespace std; template < class T > class pentathlete { protected : T comp_res [ 5 ] ; /*private: int … |
|
Hi, been programming all day long, and tryed to compile my program, everything is fine, except some kind of nonsense with ofstream.. These are the problems, and i don't know why ofstream says such things, because in my other programs everything is fine with seekg, or tellg, and everything else … |
|
Hi, have tryed and everything below gives me 0 [CODE=c++] sizeof(array) / sizeof(*array); sizeof(array) / sizeof(array[0]); sizeof(array) / sizeof(array data type); //even the thing which i do not understant: template< typename T, std::size_t N > inline std::size_t size( T(&)[N] ) { return N ; } [/CODE] I need to get … |
|
Hi, my dad asked me two write a litlle program. Nothing special, except i have problems with string to float conversion... Here is the code i wrote: [CODE=c++] #include <iostream> #include <fstream> #include <sstream> #include <string.h> #include <stdlib.h> #include <cstring> #include <iomanip> using namespace std; // main() { string sKBP, … |
|
Hi, i'm getting only one digit after floating point after conversion from string to float. Have tryed from standart functions to i don't know.. the problems is that conversion whatever it would be (strtod(), stringstream >> float, atof(), don't even rembember all other wacky ways to do that) brings me … |