General C++ Programming - April 2010 (Page 4)

by dizou
return value from extern "C" not right
 
I am using Red Hat Linux. I have two directories: ~/GetOneHundred ~/GetOneHundred/ReturnOneHundred In ~/GetOneHundred/ReturnOneHundred, I have three files...
[2 replies] Last: So that the header file may be included by both C and C++, I often do ... (by moorecm)
output number to screen 20 numbers per min
 
how do i generate random number and output them on screen 20 numbers every 1 minute I know how to generate random number but how do i control the number of t...
[2 replies] Last: thank you! (by dandeliondream)
Iterate through STL list
 
I need to browse the elements of my STL list. I know the iterator will need to be incremented, but could anyone clarify what steps to take?
[2 replies] Last: I recommend doing this instead. for (std::list<int>::const_iterato... (by kempofighter)
Converting to base 2!
 
Hello Everyone! I am currently trying to use bitwise operators in a program of mine for school. However I am unsure on how to convert a number such as 22 fro...
[1 reply] : Similar topic: http://www.cplusplus.com/forum/general/22953/ The... (by Disch)
Convert new to malloc
 
Hello all, I have a struct called GFSPPair. I made a reference to a GFSPPair instance called "pair" by: GFSPPair *p_pair = new GFSPPair( pair ); It wor...
[10 replies] Last: Ah you're right he did say that didn't he. So yeah. You don't need... (by Disch)
by brnksk
conditional Linked List
 
i've find a way to add and del node with FIFO method here it is void add () { node *temp, *temp2; temp = new node; temp->next = NUL...
[1 reply] : I don't seem to grasp your problem... Could you explain a little bit m... (by attaboy)
Preventing delete same pointer twice
 
Hi, if I want to prevent the delete the same pointer. could you please suggest solution int main() { int *p,*q; p=new int; q=p; de...
[5 replies] Last: +1000 for Boost There's a reason parts of it are being adopted into... (by closed account 1yR4jE8b)
Problems with classes and dynamic memory allocation
 
I'm in the process of writing a student database that reads in student data from an input file and refers to data in the program by using a base class pointer t...
[3 replies] Last: I've found it, turned out to be a rookie (and annoying) error in think... (by xeroxface)
getting exe in linux
 
Hi, can we get exe in linux after compiling the cpp program. AS far I know when we compile cpp program through g++ we always make binary .Please coorect me if...
[7 replies] Last: I think you'd have to build it from source using a custom configuratio... (by Bazzy)
by walapu
Increasing Integer
 
Hey guys, would any of you know how to make a integer increase by 1 every 2 seconds? Then have it start over at 50?
[6 replies] Last: That wasn't funny, firedraco... *bursts out laughing* Seriously, th... (by Albatross)
Comparing stacks and queues to determine if they're equal.
 
I've just got a quick question regarding this--specifically, my algorithm. Is there a flaw in it, or is there an easier way to compare the two? Basically, th...
[2 replies] Last: Err...that was kind of my algorithm in the first post. It's all of tho... (by Renascent)
hour modification
 
Hello, I need to know if there is a function to modify the hour or the time zone only for the developped application not for all the system (by setting TZ en...
[5 replies] Last: hm.. guess then you can prepare to roll your own timezone stuff. :-( ... (by imi)
Pointer Notation
 
I'm trying to figure out a program that uses pointer notation to display numbers in an array. I have to use the pointer notation *arrayname. This is what I h...
[2 replies] Last: rates and *(rates + i) are equivalent expressions. The first u... (by kbw)
Behaviour of a static member in static function
 
When you look at the following code, you'll see, there is a static member, which is initialised to be 0, nevertheless, such initialization happens just once for...
[1 reply] : Static variables have global lifetime, local scope and are initialised... (by kbw)
BIOS
 
I want to start programming which would require knowledge of BIOS. Please tell me where to start reading for bios Thanks in advance
[6 replies] Last: Writing bootsectors is quite fun. Another thing you can do is install ... (by chrisname)
by mayarb
random function
 
hi, Did someone familiar with random function that generate numbers between 0-1,000,000 ? thanks, maya
[7 replies] Last: didn't know. Sorry. Would you mind elaborating that? One nice e... (by imi)
Destructor is being called..
 
Hello I am facing a problem with this code section class Triangle { public: long int ID; Normal *origNormal; Triangle() {ID=0; origNor...
[10 replies] Last: Also note that operator= should check that it is not assigning to its... (by imi)
Prime nos
 
Hye Guys I have been working on this problem for too long...Would be really glad if u all can throw some light on how to go about this problem.. thnx in ...
[4 replies] Last: @KrishnaV prat007 is selected for further rounds in General electrica... (by abhigrawal)
Program using arrays
 
ok I am trying to write a program for school and I have no clue how to do this program. If anyone can help it would be awesome and much appreciated. I will writ...
[8 replies] Last: You are welcome! :D (by m4ster r0shi)
by Edark
Copying derivated object from base class reference
 
Hello all. I'm new in this forum and was really useful for me to solve problems with C++. Thanks for that. Now I have a problem I can't solve yet. I'm wor...
[16 replies] Last: Well, I have almost finished the core classes of my particle system. F... (by Edark)
April 2010 Pages: 123456... 24
  Archived months: [mar2010] [may2010]

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