General C++ Programming - April 2015 (Page 28)

Key_value, std::map
 
I have a problem with searching the value of the std::map. I had a key value std::string and I'm definetly sure that this map has the value with such key. But i...
[14 replies] Last: cire, Yeh, I've tried it already. And now I'm clear with it. So pr... (by Valdamire)
How to skip a function in main?
 
So I have this program full of header files / functions. And in my main it primarily consists of a switch menu along with all these functions. The user select...
[1 reply] : You could let the Checkout() function return a value indicating if it ... (by Peter87)
Char Input Validation.
 
Hey guys, I'm having a bit of trouble making sure the user can't input anything other than 'Y', 'y', or 'N', 'n' for a Yes or No question. My code: cout <...
[2 replies] Last: Yup! That works! VERY nice code you just wrote up there, I like your u... (by RelentlessChaos)
Overloading default hash function
 
I copied this into my hash table header file so I can use a different string hash function, but it causes a redefinition error. My teacher said I could just put...
[4 replies] Last: #include <iostream> #include <string> #include <functional> #include ... (by JLBorges)
Urgent simple question
 
In a program, there are these headers: #ifndef Personh #define Personh and then at the bottom of the program is: #endif; What is the point of this? I have...
[1 reply] : I imagine the file there would be person.h. If you included the conte... (by DaBOSS)
CMake Cross Platform C++ Deployment
 
What is the best way to deploy c++ applications that includes third party libs? I am trying to deploy a program to Windows and Linux with the libraries SDL2 and...
[no replies]
typedef
 
Can someone teach me typedef using simple examples? I get that it can be used this way: typedef unsigned int car; car newVar; that will make new...
[2 replies] Last: Thanks Tarik. I think I have what I wanted and now I'm viewing his vid... (by cppnoob25)
Another way to write this line?
 
#include "Person.h" #include <string> using namespace std; void Person::print() { printf_s("%s %s %d", firstName.c_str(), lastName.c_str(), id); } Line 6. ...
[2 replies] Last: What about this? void ParttimeEmployee::print() { Person::print()... (by Thanase)
How to align output to the top of the console?
 
At the start of my program, my menu looks like this: http://i.imgur.com/OhWUcum.png But when I do a do while loop to repeat the program in addition to using ...
[7 replies] Last: @Programmer007, If you read my OP. I stated that it doesn't seem to ma... (by RelentlessChaos)
April 2015 Pages: 1... 262728
  Archived months: [mar2015] [may2015]

This is an archived page. To post a new message, go to the current page.