-
Replied To a Post in A native wrapper, allowing some missing functionality.
I would like to ask why you need to pass your array by value? -
Replied To a Post in [C\C++11 - win32] - how compare LPSTR or LPCSTR with string?
What is the value of `s.cch` after you call `GetMenuItemInfo()`? -
Replied To a Post in [C\C++11 - win32] - how compare LPSTR or LPCSTR with string?
What is the error you are getting? An `LPSTR` is just a `char*` and a `LPCSTR` is a `const char*`. Since `std::string` has `operaotr==(std::string, const char*)` you should be able … -
Replied To a Post in Can't pass an array of string into a function using pointer.
line 5: `void print(string *ar[])` which becomes line 5: `void print(string **)` line 23 `print(&s)` which becomes line 23 `print(s)` Since the name of an array is the address of … -
Replied To a Post in getting min and max value from a column in vectors of vector
When dealing with a 2d vector/array the first dimension is the row and the second dimension is the column. If you wanted to go through all of the elements you … -
Replied To a Post in Deleting lists but not pointers to c strings
There are two main ways to delete a list that I know. You can use recursion or you can iterate. // recursion void delete(listNode node) { if (node.next != nullptr) … -
Replied To a Post in Copy assignment and inheritance.
@rubberman - I think the main reason C++ added the brace initialization is that it now allows for more robust object initialization which enhances [RAII](http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization). With brace initialization we can … -
Replied To a Post in Copy assignment and inheritance.
B& operator=(const B& b) // Copy Assignment { if (&b != this) // you should always do this so you dont do a self assignment { A::operator=(b) // call A … -
Replied To a Post in using turbo c++
I dont think so. Maybe you should read the [Rules](https://www.daniweb.com/community/rules). -
Replied To a Post in write a c++ program to check it's a palindrome number or not ?pleasseeeee
So what seams to be your problem? We do not give answers here but we do offer assistance. -
Replied To a Post in c++
Isn't that question for you to solve? We will help you hear, not give you the answers. -
Replied To a Post in how we can make a game in c++
Step 1: Write a problem statement for what you want to do Step 2: Write an outline, if it is complex Step 3: Write up a section in pseudo-code (English … -
Replied To a Post in Reverse string
I would split the string up into an vector of sub strings. Reverse each sub string in the vector. Then combine them all back together. You can easily split a … -
Replied To a Post in BlackJack Issues
That could be an error relating to the fact the you don't have a [main()](http://en.cppreference.com/w/cpp/language/main_function) function -
Replied To a Post in BlackJack Issues
Line 167: `GenericPLayer::GenericPLayer(const string& name);`. Get rid of the semicolon at the end. Line 184: `class Player` Line 189: `virtual ~PLayer();` Do you notice the difference between the class name? -
Replied To a Post in BlackJack
That is because you have the declaration commented out on line 92. void Hand::Clear() { //iterate through vector , freeing all memory on the heap vector<Card*>::iterator iter = m_Cards.being(); for … -
Replied To a Post in Install VS2013 to a different drive
Its just Microsoft being Microsoft. I am going to spin up a linux distro on my machine at home sometime soon and see if I can get rid of Bill … -
Replied To a Post in Simulate a patient’s lines using queues with enqueue ( ), dequeue ( ) and p
What do you need help with? Your instructor gave you how the program should function and work. Is there a part you don't understand? -
Replied To a Post in Install VS2013 to a different drive
[This](http://blogs.msdn.com/b/heaths/archive/2012/03/07/why-visual-studio-11-requires-space-on-the-system-drive.aspx) details why this can't be done. There is a hack [here](http://www.placona.co.uk/1196/dotnet/installing-visual-studio-on-a-different-drive/) that you can do to get around this but it is not microsoft approved. -
Replied To a Post in Removing 0's
I would use the modulo operator (%) and division for this. Modulo gives you the remainder of integer division so `100 % 10 = 0`. So if `100 % 10 … -
Replied To a Post in Tic Tac Toe
You have ab extra `}` on line 197. get rid of that and it should compile. No sure if your code is exactly right though. it looks weird that you … -
Replied To a Post in concept of passing and returning objects
Step 1: Write a problem statement for what you want to do Step 2: Write an outline, if it is complex Step 3: Write up a section in pseudo-code (English … -
Replied To a Post in c++ code
Okay go ahead and get coding. Is there a part you dont understand? -
Created Spell Check
Did a recent change happen to the spell checker? I could be wrong but now it is spell checking things inside code tags to where before I can't remember it … -
Replied To a Post in Unable to create class
More then likely it is not. Post the code using the `#ifndef` that does not work. -
Replied To a Post in Unable to create class
Post the code you have. -
Replied To a Post in Calling functions
What problem are you actually having? Do you know how to find if two circles on a plane intersect? I don't think you will find anyone on here that is … -
Replied To a Post in Getting leftover string contents from input buffer
Oh. Oops. You could also do this using a string stream: string leftoverInput string temp; stringstream ss; while(getline(cin, temp)) ss << temp; leftoverInput = ss.str(); I am not sure if … -
Replied To a Post in Divide User Input by 2 Until 1
You need to actually change input every loop. You can do that by using `input /= 2;` after line 17. -
Replied To a Post in Divide User Input by 2 Until 1
You also need to get rid of line 23. that will force you out of the loop on the first iteration which is not what you want. -
Replied To a Post in Getting leftover string contents from input buffer
If you really want to clear out the input buffer then you should use [Narue's code](https://www.daniweb.com/software-development/cpp/threads/90228/flushing-the-input-stream). Calling `std::cin.ignore( std::numeric_limits<std::streamsize>::max(), '\n');` should work almost always but as Narue mentions in her … -
Replied To a Post in Need C++ code to sort a queue using another queue and non array alement
Well a queue is a FIFO data structure. In order to sort it you need to to find the smallest part by popping the front and checking it against a … -
Replied To a Post in Extra line in txt files
Show we what code you used for that. Did you remove the line `inFile >> number;` from inside the while lop as that will cause a double read. -
Replied To a Post in someone can help to convert this to C
Do you know how to output in C? Do you know to cast to different types in C? -
Replied To a Post in Program Help
Give [this](http://www.cplusplus.com/forum/articles/11153/) article a read. -
Replied To a Post in Overload the + Operator
CTime_24& CTime_24::operator+=(int seconds) { m_Seconds += seconds; m_Minutes += this->m_Seconds / 60; m_Seconds %= 60; m_Hours += this->m_Minutes / 60; m_Minutes %= 60; m_Hours %= 24; return *this; } ////+= … -
Replied To a Post in Extra line in txt files
`while (!inFile.eof())` is never the way you want to read from the file. When reading the last line of the file the EOF flag does not get sent until it … -
Replied To a Post in Program Help
This could be done very simply with the strings [] operator: int main() { std::string line; std::cout << "Please enter you string: "; getline(std::cin, line); // loop through each letter … -
Replied To a Post in Radix Sort C++ with Time Executation
Did you copy this code from somewhere? I have a hard time believing that you could produce this code and not know how to generate random numbers. -
Replied To a Post in file parsing
What are you supposed to do with the data when you get it? What part of reading in from the file is giving you a problem? -
Replied To a Post in ARRAY PROGRAM
@ Fosterzone An array isn't just for int's. All an array is is a group of elements that all have the same type. each element is differentiated by a unique … -
Replied To a Post in I'm new please guide me through
Is there anything in particular you want to know. I don't think anyone on here is just going to tutor you in C++. -
Replied To a Post in the 'Get' macro
What are you trying to do with this? From what I know about lambda's `[this]()->x` means: function that captures the this pointer and returns x and has no function body. … -
Replied To a Post in Program received signal SIGSEGV, Segmentation fault at line 66.
if your compiler is saying the code from the STL is causing the sigsegv ignore that. 99.99% of the time it is your code that is causing the issue. Can … -
Replied To a Post in Program received signal SIGSEGV, Segmentation fault at line 66.
This is a typical symptom that you are trashing the memory. If removing a variable fixes a sigsev that normally means you are trying to access an array out of … -
Replied To a Post in solve it pls. its urgrnt
I think you missed the most important part of the assignment. >You are required to write a program... -
Replied To a Post in help me with this urgent......!
First you have to write classes that will define every object that is represented in that scene. Once you have that then you need to use those classes in your … -
Replied To a Post in Program received signal SIGSEGV, Segmentation fault at line 66.
What is the type of `category_name` -
Replied To a Post in Simpletron in C++
What is the problem you are having? Taking some else's broken code and trying to use might not be the best approach. -
Gave Reputation to mike_2000_17 in looking for some help with underclared code thanks.
> Can I ask what `char *strerror(num) int num;` means? I had never seen this before either. Since the OP did not report an error besides the `sys_nerr`-related stuff, I …
The End.