-
Replied To a Post in Cpp
http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list -
Replied To a Post in Negatif An Positif C++ (Help)
For three integers you can hardcode it fairly simply as int a, b, c; std::cin >> a >> b >> c; int positiveCounter = 0; int negativeCounter = 0; if … -
Gave Reputation to Raj chanda in input 5 numbers and print in ascending order in c++
#include<iostream.h> #include<conio.h> void main() { int a[5], n, i, j, temp; clrscr(); cout<<"Enter the no. of elements:"; cin>> n; cout<<"Enter the array elements:"; for(i=0; i< n; i++) cin>>a[i]; //------Operation part------- … -
Replied To a Post in Help needed ASAP!
Well if we use integer math then the answer would be #include <iostream> int main() { std::cout << 1; std::cin.get(); return 0; } -
Replied To a Post in Virtual base classes and derived constructor
Derived classes only need to construct the classes the directly derive from. If those classes derive from something else then it the responsibility of those classes to construct what classes … -
Replied To a Post in Pointer to Member function
Memeber functions are members of a class. Because of that they are not the same as free functions when it comes to function pointers. void (*ptr)(void); Will match any function … -
Replied To a Post in sdf intellisense files are Huge
What is your question? 26,760,055 bytes is only 26.7 MB which is not very large in todays world. -
Replied To a Post in Accessing private variables via object's address
As [Bjarne Stroustrup](https://en.wikipedia.org/wiki/Bjarne_Stroustrup) has said >**C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg.** -
Gave Reputation to New Jack in Program to display Factors of a Number
#include<stdio.h> int main() { int i,input_number; scanf("%d",&input_number); for(i=1;i<=input_number;i++) { if(input_number%i==0) printf("%d ",i); } return 0; } Is that OK with you? -
Replied To a Post in A confused questions upon c++(STL)
The first issue is your comparison operator is not folowing the strict weak ordering that `std::set` requires. You are only comparing `L` when you need to check if the `L`'s … -
Replied To a Post in C++ 11 thread equivalent of pthread barrier
You might be able to use a [`std::mutex`](http://en.cppreference.com/w/cpp/thread/mutex) for this. You might also want to rethink your data structure. You could have all of the thread writing to a [thread … -
Replied To a Post in Split String
You could do this fairly easily with a `stringstream` and `getline()`. The split function would look like: std::vector<std::string> split_string(const std::string & line, char delim = ' ') { std::vector<std::string> sep; … -
Replied To a Post in Program to display Factors of a Number
Um 1, 4, 6, 12, 15, 20, 30 and 60 are not prime factors. the prime factors of 60 are 2, 2, 3, 5. You can prove that since `2*2 … -
Replied To a Post in Question about accessing character handling functions
More than likely one of the headers that you are including in your code is including that header. This is something you should **NOT** rely on. You should explicitly include … -
Replied To a Post in Declaration Syntax Error
You are not allowed to define a function in a function and that is what the compiler is complaining about. There are two solutions to this. You could move the … -
Replied To a Post in Problem with calling STL algorithm transform
You are still using the wrong overload for [std::transform](http://en.cppreference.com/w/cpp/algorithm/transform). Since you are modifying the string inplace you need the overload that takes the range to work on and the iterator … -
Replied To a Post in Clean up resources when user closes console
reading the answer [here](http://stackoverflow.com/questions/696117/what-happens-when-you-close-a-c-console-application) it looks like you can register an event handler with the OS and handle the closing of the cmd window youself. in the closing routine you … -
Replied To a Post in Game for children
And the reason you posted this again instead of using the wonderful advice Moschops gave you? If you need to follow up with you question please use: https://www.daniweb.com/software-development/cpp/threads/498358/game-on-c- -
Replied To a Post in Problem with calling STL algorithm transform
@nullptr you should really be using a unsigned char as any other value is UB. http://en.cppreference.com/w/cpp/string/byte/tolower -
Replied To a Post in ownership issue with unique_ptr
As Moschops said you are moving the data from `p` so trying to use it after that results in your segfault. `std::unique_ptr` doe have an `operator bool()` that will return … -
Replied To a Post in Why use "const" here?
@vijayan121 I just wanted to let you know about this other online compiler with assembly view: http://goo.gl/64kMZO -
Replied To a Post in Creating columns with setw without counting characters
Silly question but can't you have your teacher explain what you should have done not to have points taken off? It is hard for us to know what he is … -
Replied To a Post in a code that force the user to insert captial letters and numbers as pass
@ravenous just using `size_t upper_case_count = std::count_if( password.cbegin(), password.cend(), std::isupper );` [will not compile](http://coliru.stacked-crooked.com/a/0ae835d8a0a155ef). [If you use a lambda](http://coliru.stacked-crooked.com/a/93b92e75f1f15837) then it will. -
Replied To a Post in class and objects
If you [indent](https://en.wikipedia.org/wiki/Indent_style#Allman_style) you code correctly we might be able to help you better. -
Replied To a Post in KidsWordGame
What don't you understand about it? -
Replied To a Post in Why use "const" here?
I will have to agree with @Suzie999 on this. Once you get into the mindset of using `const` whenever you have a constant value then you should just keep on … -
Replied To a Post in a code that force the user to insert captial letters and numbers as pass
Well if you store the password as a [`std::string`](http://en.cppreference.com/w/cpp/string/basic_string) then you can iterate over each character and check if it is upper or lower case with [`std::isupper`](http://en.cppreference.com/w/cpp/string/byte/isupper) and [`std::islower`](http://en.cppreference.com/w/cpp/string/byte/islower). To … -
Replied To a Post in Can somebody help me! Need help on c++ coding
No one is going to write the code for you. If write some code youself and you have an issue with it then post the code you have and what … -
Replied To a Post in a code that force the user to insert captial letters and numbers as pass
No one is going to write the code for you. If write some code youself and you have an issue with it then post the code you have and what … -
Replied To a Post in I need to include switch case. I dont know how to use it with string
You cannot use a `switch` `case` with a `std::string`. `switch` can only evaluate integer type expressions. See this for more information on `switch`: http://en.cppreference.com/w/cpp/language/switch -
Replied To a Post in programming
And your question is? -
Replied To a Post in flowchart & program
Help with which part? -
Replied To a Post in include graphics .h in vs2013
Don't. `graphics.h` comes from the old wild west days of C++ and is not portable/standard. -
Replied To a Post in sort by text[need help urgent...!]
So your university doesn't want you to post code to help sites but it is okay to get and use code from help sites? -
Replied To a Post in sort by text[need help urgent...!]
Its hard to tell you how to code it if we can't see your code. -
Replied To a Post in Reading data into an array from a file
`std::vector` is a dynamically resizing array. This is one of the first standard containers you should learn how to use. It has a `[]` operator so you can use it … -
Replied To a Post in Reading data into an array from a file
If you have an unknow amount of data to read then you can read in each object/line from the file and store it into a vector. Lets say you have … -
Replied To a Post in Nadia Team
We will not do your homework for you. If you have a problem with the code you have then post the code and what the problem is. -
Replied To a Post in how to program to sort in ascending/descendin order random using LL and DLL
Okay. All done. That wasn't to bad. Did you have a question? -
Replied To a Post in test program
Lines 8-12 will never be executed with the code you have. In your function you have: if(b<=4) return b; else return go(b+1)*go(b-2)-(b*2); So if `b <= 4` then you `return … -
Replied To a Post in converting program and functions fromVs2013 to qt
I doubt anyone is going to do that for free for you. There is a [Jobs and Resumes](https://www.daniweb.com/business-exchange/jobs-and-resumes/52) forum where you could post this as a contract job and pay … -
Replied To a Post in convert any number to any base..
@Zoran_1 Your code is not C++. This is a question is asking about solving this with C++. -
Replied To a Post in When to use string iterator
Doing most things with standard containers involves using iterators. Even using the new ranged based for loops does. If you take for example: for ( range_declaration : range_expression ) loop_statement … -
Replied To a Post in learn c++
Sure. There are plenty of good book [here](https://www.daniweb.com/software-development/cpp/threads/70096/c-books) and [here](http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list) you could use. -
Replied To a Post in few questions about c++ then and now
It should be possible. It depends on how platform dependent the code bases are and how standard compliant the code is. -
Replied To a Post in can u answer this question ?
@basit_3 please refrain from just giving code to homework vultures. If they have a problem with code helping them is fine. Just give me the code questions should be ignored. -
Replied To a Post in Calculator with function
@basit do encourage menex's behavior. If they have a question they should ask there own question. Also you shouldn't answer question just asking for code. -
Replied To a Post in stream operator overloading
the `>>` and `<<` operators are overloaded for `char*`. Since you have an operator `char*` defined for you class it is implicitly convertable into a `char*`. Since it is implicitly … -
Replied To a Post in two definitions of string?
@nathan.pavlovsky All member functions of `std::string` reside in the `<string>` header. [Here](http://en.cppreference.com/w/cpp/string/basic_string) is a good reference that shows you everything in `<string>` -
Replied To a Post in student record management system with linklist
No we will not give you the code for you assignment. This is called cheating and in any decent educational institution you should get expelled for that. Now if you …
The End.