General C++ Programming - May 2009 (Page 8)

by stroem
Resizing dynamic array?
 
how do I resize dynamic array without using loop? (And I dont want too use std::vector). loop ver...
[7 replies] Last: Oh yeah, I should not use a new with a malloc. sorry... (by canilao)
generate a deck of cards
 
hay guys im having rouble with generating a deck of cards...im not really sure exactly how i should ...
[3 replies] Last: canilao has described one possibility. But a card can be uniquely defi... (by Hammurabi)
string to int conversion
 
Hi! I used atoi from stdlib to manage this conversion ... something like this. #include <stri...
[5 replies] Last: also #include <boost/lexical_cast.hpp> int n = boost::lexical... (by jsmith)
by Disch
Get app path+name
 
Looking for a way to get the executable's full path and filename. *nix solutions in particular, but...
[5 replies] Last: Yes, if your application is in a PATH directory you'll have to search ... (by Duthomhas)
by vkq123
Function pointers
 
Hi can somebody explain me what this function pointer means... void *(*(*fp1)(int)) ; As I u...
[13 replies] Last: Thanks guys. :)... i understand this was a very difficult one... and t... (by vkq123)
Winsock & Threads
 
Hey There... I am writing a small chat program: 1 host, multiple clients. I managed the messag...
[4 replies] Last: Do you realize any solution , how i could get all the Clients stuff ov... (by Incubbus)
by Karami
unexpected output from binary file.
 
void read () { int buff; fstream bin ("fails.bin", ios::in); while (bin) { ...
[3 replies] Last: Use a struct of 4 ints and read all four ints in at once into the stru... (by PanGalactic)
GUI Windows && Linux
 
Okay, I'm thinking about learning C++, but I was wondering if it was possible to make a GUI using ...
[2 replies] Last: Why it's very possible.And very recommended.This way you won't support... (by andrei c)
by nanger
about escape character "\b"
 
for(....) { fprintf(fp,"%d ",..); } fprintf(fp,"\b\n"); as the codes above show, I wa...
[5 replies] Last: thanks very much for the detailed descriptions! (by nanger)
Assistance needed with NAN
 
Hi all Yet another question from me and hope some one shoots the answer immediately.. very simple...
[2 replies] Last: bang on target........ thanks.. that was the problem .. but now an... (by Sundar0206)
by nanger
what is wrong with my program?
 
Peer::add_link (this=0x8077398, dest=0x80f6630) at /usr/include/c++/4.2/bits/stl_deque.h:105...
[11 replies] Last: I haven't modified p_out_links class Link { PPeer l_to; //... (by nanger)
Static Casting is not working.What can be bug in it?
 
hi everybody . I am trying to use static casting to downcast it .but its not working.Plz help me to...
[6 replies] Last: I don't often use typeid() (by "often" I mean "ever"), so I had to lo... (by Disch)
by nanger
erros in debugging
 
void make_random_neighbourhood(POverlay po, size_t degree) { size_t n = po->num_peers(); for...
[4 replies] Last: What level optimization level did you compile at? The compiler will f... (by PanGalactic)
flush cin
 
Hi How can i flush cin so that i can read a string with spaces after reading an int? #include <io...
[4 replies] Last: That's more like it. Thanks (by graciano)
inpout32 in Turbo C ??
 
Hi I am developing a project that hass to access the pc parallel port in windows xp, through Turbo C...
[no replies]
Reserve Memory for GMP Integers?
 
I'm working on an algorithm which calculates the square root of 2 to many decimal places. I'm iterat...
[2 replies] Last: I have read the relevant sections of TFM and strangely enough, there's... (by Mozza314)
Including scripting support in C++ application
 
Hi! What scripting language would You recommend from the set of Python, Common Lisp, Scheme to be us...
[10 replies] Last: Got it working. Thanks. (by Repentinus)
Function pointer question
 
I found this code in an open-source project: char* address; // (...) return (void*)*(unsigned ...
[1 reply] : that casts address+0x44 to a pointer to pointer to unsigned int and ... (by Bazzy)
c++ class implication problem
 
Question Details: I am having difficulty implimenting these umls. I dont even know how to start. Pl...
[no replies]
What should I do if malloc() fails?
 
I was wondering what I am supposed to do if malloc() returns NULL. Currently the program shows an er...
[4 replies] Last: In my experience (UNIX) it is MOST important to handle malloc failures... (by jfq722)
May 2009 Pages: 1... 678910... 17
  Archived months: [apr2009] [jun2009]

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