General C++ Programming - June 2010 (Page 11)

keeping track of time in a sound file
 
How do you keep track of time in a sound file? I'm creating a class that will mark down in an arr...
[no replies]
some questions about exceptions
 
* is that ever possible to throw and catch without a single copying of what's thrown? Example? * wh...
[4 replies] Last: I've always thought the anonymous Copyable would get destroyed when yo... (by closed account 1yR4jE8b)
How do I clear a textfile in a program
 
Hi guys, I need to clear a textfile after I click a button instead of deleting it. I found a few cod...
[3 replies] Last: If you want to ensure deletion of the contents, open the file with the... (by Incubbus)
CONSTRUCTOR CALLS...
 
In this code: Class X{ public: X() { cout<<"Constructor\n"; } ~X() { cout<<"Destructor\n...
[3 replies] Last: I was thinking if it's sane to rely on such behaviour or not. As for m... (by KarlisRepsons)
how to use boost lib property tree to get children name
 
Hi I have read the 5 min tutorial that provided by boost.org but i have no idea of how to get t...
[no replies]
by JFloyd
Lattice Number Generator
 
I had the idea today of a "lattice" number generator. The concept of it is this: 1) User inputs ...
[1 reply] : I thought of a way to do it with arrays where it creates as many slots... (by JFloyd)
by donnyb
Memory leaks
 
I have done my homework on this subject. Here is the deal. I run valgrind (a memory checker for my ...
[6 replies] Last: Found the leak. I wrote two functions that malloc the data only once,... (by donnyb)
by DeucEy
Char String Won't Recognize
 
Im trying to make a 'make your own bug' program sort to speak, and One of my members in the class Bu...
[2 replies] Last: I like the way you illustrated that lol. That takes care of that prob... (by DeucEy)
sizeof string pointer
 
Hi , I have a class in which i have a private variable as private: static const int size = 1...
[8 replies] Last: Never mind. memset() and memcpy() only make a difference when dealing ... (by helios)
multimap find with inconsistent order
 
Hi, I've got a situation where I'm trying to find a range of keys that equal, but the sorted nature...
[8 replies] Last: Well, the N's are supposed to represent wild-card character values. So... (by smcguffee)
rotating a 2d vector in directx
 
I'm making a 2d game in directx and need a function to rotate a 2d vector(D3DXVECTOR2). There are di...
[1 reply] : I am learning direct3D 9 now for the same purpose (writing 2D games)!... (by closed account D80DSL3A)
iterating objects
 
What is it called when you iterate objects? ex: class snake { public: void setAge(int a) {_ag...
[8 replies] Last: You can't output the literal names "mary", "joe" and "betty" unless yo... (by Galik)
Your favourite C++ undefined behaviours? (1,2)
 
For me the first thing to come in mind is the uncertain expression evaluation order, for example: E...
[35 replies] Last: Recursively re-entering a function during the initialization of its s... (by helios)
mandatory pre-declaration of friend function?
 
This works well on GCC despite "The C++ Programming Language 3rd ed." p 280 appears to say it can't...
[4 replies] Last: As far as I can tell the Standard C++03 says it is legal unless your c... (by Galik)
2D-Array with Polymorphy
 
I wanna create a field for a little game. The field consists of the followed classes: Floor Wall...
[6 replies] Last: I'm working on something very similar, so I think I could help you ... (by closed account 1yR4jE8b)
Move a mouse to a point on a screen?
 
I wanna know if its possible to move a mouse to a certain point on the screen. I looked at the post ...
[1 reply] : The console cursor and the mouse cursor are two different things. To w... (by Duthomhas)
Inputting 0101 and store as 101
 
Is there any way to do that? For example, the user input 0101 to the program and the program stores ...
[2 replies] Last: When you cin >> somenumber then leading zeros are discounted. How... (by Duthomhas)
Is this pointer code?
 
Hi guys, New to C++ so if my question is really stupid, please forgive me static void metadata(M...
[10 replies] Last: cool, that clears up my confusion thanks a bunch guys (by bubbleboys)
IOStream and STL
 
So recently, I ran into an error while writing a program of mine, and it was a curious little error ...
[3 replies] Last: maybe you need to catch the exception properly... try { ... (by bigearsbilly)
by Null
extern + functions
 
Why does this code compile? extern void msg() // ! { std::cout <<"msg"; } int main() {...
[14 replies] Last: It is no wonder that everyone is confused with all the misuse of terms... (by closed account z05DSL3A)
June 2010 Pages: 1... 910111213... 18
  Archived months: [may2010] [jul2010]

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