General C++ Programming - July 2010

by Krahl
Error after long run time
 
hi, I have written a program where there are a number of sites around a circle and these sites may ...
[no replies]
Unexplainable Error
 
I have this program where I m trying to stimulate a queue. The program goes into an infinite loop, I...
[5 replies] Last: I revised the code & realise that allocation to the dynamic array tell... (by Suzanne)
stl priority queue sequence
 
Hello all, I have some stupid questions, but it would be great if some one helps. we know priorit...
[4 replies] Last: Thanx. Thats exactly what i was looking for. U r cool. Thanx :D. (by dumbterminal)
by onako
Matrix transpose
 
I store matrix entries in std::vector<double>, such that the reading is row by row. This means, fo...
[15 replies] Last: I just ran a little benchmark. #include <iostream> #include <vect... (by helios)
by declan
How can I declare a derived class when declaring an array of its base class?
 
Hey guys, I have a class called Plane, with a few subclasses, roughly like this: class Plane{ ...
[3 replies] Last: A regular vector would not conform to RAII (in this case), so it is be... (by Athar)
Template Overloading
 
Hi there, I'm not sure the above is the correct term but is there anyway to overload a template c...
[3 replies] Last: something like this? template <typename T1, typename T2 = int, t... (by bigearsbilly)
boost::unordered_map / boost::multi_index_container
 
I was writing an abstraction for an ICU resource bundle (UTF-8 text file containing composite data)....
[13 replies] Last: Yes, Boost.Variant is an option. The data is relatively simple and co... (by moorecm)
Converting inline assembler to .asm file
 
Hi all, I'm having a problem converting an inline assembler function to .asm file. I need seperat...
[no replies]
by ibwood
Conversion type error
 
Hi everyone, In lines 126-129 of my code, I have this error: "expected constructor, destructor...
[4 replies] Last: Thanks :) (by ibwood)
using nested struct slot as a type specifier?
 
a timespec from time.h looks like this on BSD: struct timespec { time_t tv_sec; long tv_...
[5 replies] Last: They think of everything! Thanks for the info. (by kbw)
by pccX
STL set_intersection() and set container
 
I try to do a set intersection of two STL set containers and output into an STL set contrainer. I h...
[4 replies] Last: Tried to use a set<int>::iterator for what? The last parameter to set... (by jsmith)
bit-based swaping operation
 
I recently read a function that swaps two variable based on bit operation void swap(int &i, int ...
[4 replies] Last: (and anything that supports a bit-wise XOR operation). Duoas is ans... (by jsmith)
Generate 32 bits random PRIME number
 
Hello, may I know how to generate 32-bit random prime number? Pls reply asap. thanks
[3 replies] Last: http://cplusplus.com/forum/general/3551/ http://cplusplus.com/forum/b... (by Skillless)
is this static legal?
 
I understood this to be illegal, but it works on my gcc 4.2.1 struct seconds { static co...
[4 replies] Last: it works ok with: -std=c++98 that's good enough for me. t... (by bigearsbilly)
Reading file into structre
 
I am trying to read in a file with the follwing data structure: typedef struct tld_msg { char* ...
[5 replies] Last: The data doesn't match the file format. And the string end ends with ... (by kbw)
position of automatic variables declaration wrt loops
 
In some code I'm looking over, I'm seeing a fair bit of this sort of thing : 1. Type *ptr; f...
[12 replies] Last: FWIW, I compile and run that exact code on my Ubuntu Linux system with... (by davidmaxwaterman)
by Colby
Calculate the displacement vector, velocity vector and total frames
 
I'm not even sure where to start, i had a horrible professor my last programming class, and i am str...
[no replies]
RSA in openSSL
 
Hello again, I've been looking on google on how to use openSSL's RSA functions but I can't seem t...
[4 replies] Last: Not to sound rude, but that comment is extremely arrogant. I'm simp... (by Phantom139)
by ozair
VC++ 2010 graphics library
 
hello, I am trying to get started with openGL graphics library.. I do not have any knowledge ...
[5 replies] Last: CWnd wraps the HWND parameter, so the 3 parameters of the CWnd method ... (by kbw)
Function callbacks
 
I wanted some help trying to create a callback function with C++. Below is a header file and I would...
[2 replies] Last: read through http://www.newty.de/fpt/callback.html (by Skillless)
July 2010 Pages: 123... 20
  Archived months: [jun2010] [aug2010]

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