506 Posted Topics

Member Avatar for RisTar

I assume you have this one function which can convert a single character to a number. Say it is [I]int convert_one_char(const char c)[/I]. Given this function here is the code to extend it to convert a string with multiple chars: [code=c++] int convert_one_char(const char c) { if( c == '0' …

Member Avatar for RisTar
0
251
Member Avatar for n.aggel

As long as both enums are NOT used within same switch-case there are no issues at all.. If you wish to use them in same switch-case you'll get the err that case value is repeated. So all you gotta do is decide on 2 ranges for both your enums and …

Member Avatar for n.aggel
0
324
Member Avatar for jobra

Looking at one of your comments "(ex:"/local/tmp/sample_1.csv")" it seems like you're on Unix. So if it's possible I suggest you use awk rather than C++, it'll be much easier. head -<N> filename | tail -<M> >> splitfile This command will put lines starting from N and till M from file …

Member Avatar for Salem
0
105
Member Avatar for unclepauly

@Ancient Dragon => That is the right way of doing it. Declare your callback function to take the this pointer. Same mechanism used for thread functions as well. But in this case caller has to get the this pointer. If there is a possibility to change the callback interface there …

Member Avatar for thekashyap
0
233
Member Avatar for SHWOO

Hi !, I'm using VS Enterprise edition 6.0. Unfortunately the code you posted in the first post works without any problems. :) Only guess I have is that the compiler does [B][U]not[/U] [/B]think the operator overload function you've [B]declared[/B] as friend is same as the one you've [B]defined[/B]. Try giveing …

Member Avatar for iamthwee
0
249
Member Avatar for n.aggel

It may not be as simple as it sounds. time() returns seconds elapsed since epoch. This means that 5am and 6am by themselves can not be compared with what is returned by time() because they are relative times. (relative to start of today). So @n.aggel => what is the date …

Member Avatar for Ancient Dragon
0
153

The End.