Search:
Type: Posts; User: heidiK
Search:
Search took 0.03 seconds.
-
-
One more thing if you don't mind and have time. I am reading the values form a file and all these dates and partial sums are stored against different items. Name of the first item is A and the other...
-
-
Many Thanks Philip. Some values from the result are missing when the second solution (provided by yourself) is run.
-
Thank you Philip for explaining to me through the code above. I also want to print the first most value. i-e 110
-
Thanks all
Let me try it with the map solution
-
In this example the value in the string stored in the current iterator is 170 and the value in the string stored in the previous iterator is 110, the sum of the two values is 280 (170+110), I want to...
-
Hello all
Below is the sample of the code I need help with
int summation = 0;
for (it= s.begin(); it!= s.end(); ++it)
{
summation += std::atoi( ((*it).substr( 8 )).c_str() );
}
-
April 13th, 2011, 10:36 AM
D_Drmmr
Suppose that's one of the blocks of an xml file
<MyApp app="heidik">
<!-- Settings for MyApp -->
<Messages>
<Welcome>Welcome to MyApp</Welcome>
-
April 13th, 2011, 08:54 AM
Hello everyone
Could anyone please help me how do I find the end of a parent xml node? E-g </MyApp> in the example below is the end of the parent node <MyApp> and e-g print a msg each time after...
-
April 13th, 2011, 03:15 AM
-
November 16th, 2010, 06:57 AM
The actual code is tooooooooooo long that's why I am just posting the segments relevant to that method which is giving me an error
--------------
// header file
--------------
class...
-
November 16th, 2010, 06:38 AM
NOOO why would I lie :P, dont be angry. I have done exactly the same thing and the "static linkage" error has gone but now the new error is something related to linux I think which I copied above...
-
November 16th, 2010, 06:20 AM
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.4/../../../../include/c++/4.4.4/algorithm:62,
from class1.cpp:6:...
-
November 16th, 2010, 06:17 AM
I have already tried this as well. I removed the key word static from the definition and now some linux errors I think and I am not familiar with linux much
-
November 16th, 2010, 06:16 AM
error: cannot declare member function ‘static bool class1::compr(const class1::structT1&, const class1::structT1&)’ to have static linkage
-
November 16th, 2010, 06:13 AM
it is the .h declaration
static bool compr(const structT1& t1, const structT1& t2);
and .cpp is
static bool class1::compr(const structT1& t1, const structT1& t2)
-
November 16th, 2010, 05:59 AM
an error again
error: cannot declare member function ‘static bool removeDupEntries::compr(const removeDupEntries::ordRecvblock&, const removeDupEntries::ordRecvblock&)’ to have static linkage
-
November 16th, 2010, 05:50 AM
I have a function called compr
bool class1::compr(const structT1& t1, const structT1& t2)
{
return t1.dateTime > t2.dateTime;
}
-
November 15th, 2010, 03:59 AM
Oh thanks you sooo much Philip :)
-
November 12th, 2010, 09:11 AM
Do I necessarily have to convert the date/time part of the string to proper date time (time_t&)? because the simple string comparison is working and is picking up the correct time
-
November 12th, 2010, 09:08 AM
I have deleted the vector in my code. Sorry I missed it here :P
if (pos1 != string::npos)
{
istringstream ss(line);
getline(ss,ordb.lineID,',');
getline(ss,ordb.dateTime,',');...
-
November 12th, 2010, 08:52 AM
Thanks Philips I have been able to do it :). Let me test it with different and many lines
-
November 12th, 2010, 08:31 AM
yes that's exactly the line and the code I have so far for this task is
struct ordRecvblock
{
std::string lineID; // 0:1:OrderReceive
std::string dateTime; // 01.07.2010...
-
November 12th, 2010, 04:42 AM
I have a file that has duplicates and I have to select the one with the earliest time
0:1:OrderReceive,01.07.2010 10:38:09.984,0G508Q090,0000F9F5,A,15,0,15,0,115
0:1:OrderReceive,01.07.2010...
|
Click Here to Expand Forum to Full Width
|