Type: Posts; User: Philip Nicoletti
Search took 0.15 seconds.
delete  s;
What is "s" pointing to ? many times you increment the value of s.
September 29th, 2015, 05:42 AM
There are standard has functions for primitive types, you can just use them.
Something like the following:
std::size_t operator () (const AStarNodePair &...
September 24th, 2015, 04:15 PM
It did not compile using g++ ver 4.8.1 under MinGW/Windows
Here is a link for converting a file descriptor to a ostream or istream with g++.
It compiled under g++ ver 4.8.1 under MinGW/Windows,...
September 22nd, 2015, 09:29 AM
Just a note: that is implementation dependent. Almost all systems (except the one the OP is probably using) have RAND_MAX
of at least 2^32.
The rand() that Visual C++ uses does have a 32K...
September 15th, 2015, 06:58 AM
Yes ... it is supported under g++ ...
I just tested using : g++ ver 4.5.1 under Linux and ver 4.8.1 under Windows/MinGW
September 14th, 2015, 06:16 AM
1) what compiler are you using that uses :ios::bin instead of ios::binary ?
2) On most non-microsoft systems, ios::binary does not do anything.
August 8th, 2015, 12:06 PM
You did not make the changes that I posted earlier. Make those changes and re-run.
It is returning the entire string, but you are not printing it. You are using printf() to print the string....
August 7th, 2015, 06:39 AM
Here is the result that I get with the input that you said doesn't work:
Input password: The Input pasword is meera@saraswathi@3c@
The key is 123455
The encrpted pasword is éαk÷φ≈┬ !ú»ê↕Ω║...
August 6th, 2015, 07:23 AM
At the very least:
1) pass the length of the string to be decrypted to DecryptString:
BOOL CCryptString::DecryptString(TCHAR* szEncryptPwd,TCHAR* szPassword,TCHAR *szKey , DWORD length_in)
August 6th, 2015, 06:35 AM
What type of debugging have you tried ?
After the call:
szEncryptPwd = 0 (NULL)
The function: DecryptString() has code that...
July 20th, 2015, 10:40 AM
I'm not exactly sure what you want. maybe an example would help. column oriented input is a bit tricky. In many cases it would be easier to read the entire line into a string and parse the string. ...
July 17th, 2015, 11:19 AM
maybe something like this:
while (getline(totot,name,':')) // read everything up to an including the first ':' into name
totot >> x;
July 14th, 2015, 08:15 PM
1) what is the purpose of the "mn = buf;" line
2) Does the code that calls this function expect buf to be NULL terminated ?
I don't see any guarantee that buf is NULL terminated
3) This looks...
Do you have blank lines in the files ? If so, you will get an out-of-range error on the "at(0)" calls.
I would change:
ss >> holder;
if (holder.at(0) == 'X')
CFD codes write out in binary, since writing "text"s would be considerably slower and increase the size of data written. They usually take care of it one of two ways:
1) similar to "netcdf...
std::map<u8, u8> m_mlistOfCliConfiguredPolicyRules = boost::assign::map_list_of(Apn_Fred, 9);
I am guessing it should be:
boost::assign::map_list_of("PolicyRule_Fred", PolicyRuleInfo( BearerQoSInfo(9), TFTInfo()))
listOfPolicyRuleInfo::iterator it = m_mlistOfCliConfiguredPolicyRules.find("PolicyRule _Fred");
It depends on how the iterators are used. For example, if the vector is not sorted, it is possible that
the upper_bound iterator could end up "before" the lower bound iterator. Look at what would...
1) is the vector sorted ?
2) How are you using the returned iterators ? It should be something like:
for (auto it=it_lower; it!=it_upper; ++it)
// use it
Just a note: many c-functions that take a char * have undefined behavior if you send a null. Example:
char * p =0;
int n = strlen(p);
It might be clearer removing the range based for loop:
for(auto it=n_tuple.begin(); it!=n_tuple.end(); ++it)
auto pt = *it; // this copies the vector *it into the...
I didn't really understand your question, but ...
std::set< std::vector<int> > n_tuple = unique_n_combinations (seq, n) ;
for(auto pt : n_tuple) // so pt is of type vector<int>
If you have the second edition of "The Standard C++ Library" by Josuttis, this is explained in section 15.11.3 (Input/Output using auxiliary functions).
It is also explained in the first...
Your code is difficult to follow/modify with the use of all the "magic numbers". That is, what if you want to use 20000 rectangles instead of 10000, you would need to change the code in multiple...
The height is supposed to be calculated at the mid-point of the rectangle. It looks like you are calculating it a the left vertex.
Maybe you should initialize x as:
x = 0.5 / 10000.0;
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!