General C++ Programming - October 2012 (Page 25)

Question About find_if
 
Hello, I'm trying to find an element in a vector using find_if. If I had a vector<string>, I would do this: auto it = find_if(v.begin(), v.end(), bind2nd...
[3 replies] Last: Also you can define the equality operator that compares an object of y... (by vlad from moscow)
Which of these 2 programming styles is most recommended for use?
 
Hello everybody, sorry if the title was confusing but I wasn't sure how to make it clear. =/ So, I recently learned that one can use either pointers or variabl...
[7 replies] Last: With this: CParentClass Object = CDerivedClass(); Object.VirtualMeth... (by TheIdeasMan)
[URGENT] Statistical Calculator
 
I really need help on this for my exercise, I do not wish to see any losses mark. I beg someone could help me to solve this. By the way, i am just a college stu...
[2 replies] Last: I've solved it. Thank You (by boyagin)
Program halts for no apparent reason
 
Hi, A C++ program written by me refuses to work, halting and leaving no error message. I'm not that knowledgeable about possible behavior of some structures I ...
[2 replies] Last: Yep, it works now. Thanks a bunch! (by thestraycat27)
PROBLEM UNDERSTANDING THE HEAPSORT ALGORITHM
 
Hi everyone, is there anybody here who can explain to me how the HeapSort algorithm is implemented. I've red some book on data structures but don't seem to gras...
[no replies]
Math question
 
Hi, I recently applied to a job and took a programming test. I didn't hear back, so I'm assuming I didn't get the position. I was able to answer all of the q...
[12 replies] Last: > the choice depends on the distance the water is from the man compare... (by ne555)
SHELLEXECUTEINFOW information
 
Hello, I have been looking for an example or some documentation about this SHELLEXECUTEINFOW, but the msdn site has nothing for it (http://social.msdn.microsoft...
[4 replies] Last: I see, ok, thank you for your help! (by tsukune)
Conversion from infix to postfix .It don't work.
 
function definitions in classes are all right. problem is in output. error may be in handling array of char. using namespace std; # include <iostream> ...
[4 replies] Last: ok. thanks a lot. i got the point. http://www.cplusplus.com/forum/gene... (by closed account DETpfSEw)
multiple inheritance
 
write a program to multiple inheritance
[3 replies] Last: I don't see a question. (by kbw)
by shafh
Map of object
 
Hi. Im new to c++, and have currently a problem mapping my object: #include "dag.h" #include "dagnode.h" #include <limits> #include <map> using std...
[7 replies] Last: if you want to use your class with std::map you need a constructor so... (by coder777)
virtualization technologies
 
Hi to all! I have one simple game (for PC, ะก++). I want to make a portable version of this game, so users can play it without having to install (at work, for e...
[6 replies] Last: Write once compile anywhere That's C++'s motto. you can not run wind... (by majidkamali1370)
by MAQAH
Binary Search
 
Its a problem of the logic in binary search int binarySearch ( double array , double itemToFind, int size) { int bottom = 0; int top = size -...
[3 replies] Last: You can give up on this one (bottom <= top) Only if your su... (by ShlomoZien)
Replacing vectors for something faster
 
I was wondering if i could use something faster than a vector. This program creates windows and when they are being moved, they seem a little choppy Is there ...
[6 replies] Last: Again I am shooting in the dark here. With Qt, you create a Dialog Bo... (by TheIdeasMan)
by lmd141
Subscript must have integral type
 
Hi, for the piece of code I'm working on at the moment I've encountered a fairly basic problem that is giving me some issues. Here is the code in question: ...
[2 replies] Last: After a bit of googling, I think I've found the library you are using.... (by closed account DSLq5Di1)
Amazing output
 
In the name of Allah Hello, everyone I wrote the following sample program but I got an amazing output. I know if I use strdup function, my problem will be s...
[4 replies] Last: I'm with sloppy when it comes to snprintf() and <iostream>, etc. I as... (by andywestken)
Templates for Units conversion
 
This is carrying on from the question I asked in this post. http://www.cplusplus.com/forum/general/82053/#msg440592 I don't know much about templates, s...
[2 replies] Last: @naraku9333 Thanks for your reply. Ok, so I might be able to have t... (by TheIdeasMan)
Help with Merging Lists
 
Hey everyone, I've been assigned this problem for my course and I am COMPLETELY lost. I've spent the last 3 hours working on it, and even asked a friend or two ...
[no replies]
Iterating through a folder
 
I'm currently working on a personal project that I plan to make go through a number of files, taking data from each, perform statistical analysis, and organize ...
[2 replies] Last: boost.filesystem is the most portable solution today, and MSVC already... (by Cubbi)
Arrary dimension don't have to be const?
 
I cannot believe this, this dimension won't be known until runtime, but it works. #include <iostream> using namespace std; int main() { int i; cin>>...
[4 replies] Last: Thanks ,your information is very useful! (by northfly)
Personal Best
 
So I wrote this today, but it closes upon first input. #include <cstdlib> #include <iostream> using namespace std; int main() { string name; double ...
[7 replies] Last: i want the else on line 87 to be paired with the very first if stateme... (by rhoninho)
October 2012 Pages: 1... 2324252627... 50
  Archived months: [sep2012] [nov2012]

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