Type: Posts; User: Philip Nicoletti
Search took 0.24 seconds.
March 12th, 2014, 06:27 AM
Where does the error occur ? The only vector you have is the variable: mat
And you only do a push_back() with that variable. It is not used anywhere else.
Does the "Swap" constructor end up using...
March 11th, 2014, 09:24 PM
1) You have :
const char* file = "C:\WAR ROOM\FINANCE\Cpp\Test\Test\swapData.txt";
It should be
const char* file = "C:\\WAR ROOM\\FINANCE\\Cpp\\Test\\Test\\swapData.txt";
March 5th, 2014, 05:27 AM
FYI: Instead of implementing a callback for glutKeyboardFunc, you could implement
a callback for glutSpecialFunc and catch the keys: GLUT_KEY_UP , GLUT_KEY_DOWN,
GLUT_KEY_RIGHT , and...
February 8th, 2014, 01:17 AM
Visual C++ does that in text mode. Open the file in binary mode:
February 4th, 2014, 06:47 PM
thing & operator ++() //******** here *******
It should be things &
February 4th, 2014, 05:30 AM
cin >> the_word; //when the desired words are entered, the if loop will catch those and enter them into the vector
while (cin >> the_word)
January 21st, 2014, 08:48 AM
I don't see a reason why you can not make it a stand-alone function
or a static member function.
January 21st, 2014, 08:35 AM
Generally, the functor (hasCollided in your code), is a stand-alone function, not a member
function (or it is a static member function). There is a syntax to use if it is a member
January 21st, 2014, 08:31 AM
1) Some notes:
sprites.erase(remove_if(sprites.begin(), sprites.end(), hasCollided), sprites.end());
where sprites is a std::vector<Sprite*>
I assume that the elements of vector were...
January 8th, 2014, 09:03 PM
1) I didn't read thru all of the first post, but if operator() is used as a sort criteria, it should be:
bool operator()(const SDPair &lhs, const SDPair &rhs) const
if ( lhs.second <...
December 31st, 2013, 04:49 PM
You might look at:
December 24th, 2013, 05:23 PM
Look at the line:
cout << "The Lucky " << print() << endl; //This line
1) "The Lucky" will be printed before the RETURN VALUE of print()
2) There is no gaurantee that print() will...
December 13th, 2013, 05:22 AM
But header is never set to point to a valid TIFF_HEADER object (such as using new).
You don't need to use a pointer at all for this:
November 26th, 2013, 07:23 AM
Asumming I have not made a calculation mistake, I don't think
you even need to calculate a factorial.
I would start processing from the right (ignoring the constant).
1) consider term k! -...
November 8th, 2013, 09:42 PM
Summary of what you have ...
char * string_a = new char[loaded_values.size() + 1];
char * string_b = new char[loaded_values.size() + 1];
You should not compare...
October 28th, 2013, 11:34 AM
Also, why are you showing both dialogs ? Should only one be visible (SW_SHOW) ?
And then when the tab selection changes ... get the current tab, show/hide the appropriate
October 25th, 2013, 06:43 AM
If the user doesn't supply one, doesn't the compiler automatically
generate a copy assignment operator that does a member by member copy ?
(Unless there is a user declared move constructor and/or...
October 22nd, 2013, 06:46 AM
What is the purpose of the following statement ?
What does it do ? And how does it effect the input stream ? Hint: output the value of "x"
after you read it in.
October 17th, 2013, 06:56 AM
I don't see where a pointer is being saved to file.
If the Character class is POD, then the posted code is correct.
If the Character class contains non-POD variables (such as std::string)
September 23rd, 2013, 06:46 AM
OFN_NOCHANGEDIR does not effect GetOpenFileName.
In some cases, setting the CFileDialog's m_ofn.lpstrInitialDir works.
You might be able to use a callback function similar to:
September 12th, 2013, 07:46 AM
1) Yes, the two omissions that you mentioned should be there.
2) In the PIXELFORMATDESCRIPTOR, this line looks strange:
// PFD_DOUBLEBUFFER, // double buffered
This not only takes away...
August 20th, 2013, 12:03 PM
Below is the output when I run configure. The codes that are "missing" in your output
are located in /usr/bin on my system. Your system is not even seeing a C++ compiler.
August 20th, 2013, 09:51 AM
1) There is a file in the folder named, INSTALL. It gives the instructions:
2) There are a lot of problems ...
a) There are calls that look like this:
July 26th, 2013, 09:50 PM
std::sort requires random access iterators. std::list only has bi-directional iterators.
std::list has a member function to sort
July 18th, 2013, 10:47 PM
You have the line:
if(average[monkey][day] < 0) ;
The semi-colon should not be there. Basically, it says: if the average is less
than 0, execute a noop (empty statement). The code then...
Click Here to Expand Forum to Full Width