Type: Posts; User: Philip Nicoletti
Search took 0.14 seconds.
1) What version of Qt are you using? constructor using am initializer list started with 5.1
2) what operating system ? If Linux, and using g++, you need instruct g++ to use C++11
Add to the pro...
April 30th, 2014, 06:31 AM
You can see an example of setting up a MDI type of application:
1) open QtCreator
2) On the left pan click the "welcome" icon
3) then on the top click on "Examples"
4) Scroll down to "MDI...
April 25th, 2014, 12:00 PM
1) You are only allocating 1 space in buffer, instead of 5
2) In while loops, checking eof() almost always leads to
outputting extra values, since eof() does not become true
April 21st, 2014, 12:08 PM
Have you verified the location of make.exe ?
On my system, it is located at:
March 26th, 2014, 11:09 AM
Is 7 large enough to hold the result (with the trailing NULL) ?
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:
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.