General C++ Programming - September 2012 (Page 32)

STL sort on vector<xxx *>... Problem with sort predicate
 
Hello, I am using the STL container vector that helds pointers of my defined class. My question now: How can I define a "sort predicate" for the STL algori...
[3 replies] Last: Hello, my class "TrackPoint" has a additional member named "m_index... (by Avencher83)
determining a prime number
 
hello guys can any body help me to creat a very simple program that determine whether a number is prime or not
[5 replies] Last: i2Fluffy, i needed only some advise on how to do it not a complete pro... (by kingdro)
by vw4x4
difference between symbolic constanta and constant qualifier
 
what is the difference between a symbolic constant and a constant qualifier?
[1 reply] : http://www.parashift.com/c++-faq-lite/const-vs-define.html (by JLBorges)
C++11 thread Error
 
Hi. I copied the source example from http://en.cppreference.com/w/cpp/thread/thread/thread and created a binary file with it with no errors. But when I run it...
[2 replies] Last: Yes, Exactly. Thanks. But what is pthread option? (by majidkamali1370)
Code:Blocks with MinGW vs. Visual C++ Express
 
I have gotten interested in chess engine programming. I have downloaded both Code::Blocks with MinGW and Visual C++ Express 2010 and have noticed a difference i...
[5 replies] Last: It's not even that hard. Right on the toolbar there's a drop-list tha... (by Disch)
by rollie
Pointer to non-static member variable?
 
I was looking at a problem on Stack Overflow, and came across the following: class A { public: A(int _a, char _b, char _c, char _t):a(_a), b(_b), c(_...
[14 replies] Last: Hmm, maybe should have done more investigation. The stack overflow que... (by rollie)
Read file structure
 
So the problem is that I need to cast the file string to a variadic struct (if this exist). Something like this: char* FileString; struct FileFormat { ...
[4 replies] Last: Not by I reverse engineering a program which has a char string with th... (by sasho648)
error: Type expected class-name before ‘{’ token
 
I have googled this to quite a bit...and I'm just not understanding the problem. I have header guards...I tried forward declarations...(which I don't fully unde...
[4 replies] Last: kbw...Is this easy to do with cmake? Anyway the problem ended up bein... (by Steven Tuckness)
by rithan
Need help in using vector in class
 
dhuiwh djwqodj
[8 replies] Last: Just for completeness, the original post was this monstrosity :) c... (by Moschops)
i need help with this pls
 
Write a recursive function Factorial. The function takes a number and returns the factorial of that number if its more than 0, or else return 1. Main will call ...
[11 replies] Last: ok thanks a lot. i highly appreciate ur help (by Adam2012)
Pointers to Classes: Back and Forward
 
I'm beginning to understand Classes and I thought I would implement somethig usefull for my studies, a graph. Basically, a graph is a set of nodes (points) w...
[4 replies] Last: That worked beautifully. (by willygarcia75)
by vw4x4
differnce between escape sequence and special characters
 
1) difference between escape sequences and special characters? 2) (") and (\")do these two have different meaning for the compiler? 3) uses of escape characte...
[1 reply] : 1) Depends what you mean by "special characters". Escape sequences j... (by Disch)
Shuffle in music player
 
I am making network player and i want to shuffle playlist.. Any suggestion for shuffling songs without repetition... In short random function that will genera...
[4 replies] Last: Thank you Peter87. it helps me a lot. (by HiteshVaghani1)
need help with compiling some simple lines of code
 
code is below. compiling errors and warnings are at the bottom of the page. help is much appreciated. 1 #include <iostream> 2 3 using namespace s...
[2 replies] Last: thanks alot man. that was the only error in the code. compiles fine no... (by james16)
Finding Overlap in Ranged tuples
 
I have a pair of tuples (0,10) & (5, 15). I would like to write a function that will detect an overlap of numbers and return the numerical value of overlap(the ...
[2 replies] Last: max(0, min(e1,e2) - max(s1, s2) + 1) Just need to add 1 since I ass... (by ssrun)
Ideas for a game?
 
So I have been working on this game on and off for a while now, and I don't know where to take it. It started off as a RPG but it kind of drifted off course. ...
[no replies]
September 2012 Pages: 1... 303132
  Archived months: [aug2012] [oct2012]

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