General C++ Programming - February 2009 (Page 13)

ghosting final row of input, wt???
 
i am completely puzzled on this one. i have an *input* file that looks like this michael jordan 23 larry bird 33 larry fitzgerald 11 i ...
[9 replies] Last: yep! it worked. i am reading through that thread again, i will resear... (by mariokartlegendd)
priority_queue
 
hi, I want to make two functions in the pririty_queue adaptor. Can some1 please guide me as to how do i write the code for it?
[1 reply] : http://www.cplusplus.com/forum/articles/1295/ (by Zaita)
Syntax Error : Missing ';' before 'PCH Creation Point'
 
Be grateful of some assistance. I have been trying to compile source code in Visual C++ 6.0 and I keep getting the following error message : Syntax Erro...
[3 replies] Last: Thanks for your help and advice. It seems to be compiling okay now,... (by PatrickO)
by chris
Ellipsis Parameter
 
I was wondering when using the ellipsis parameter (the three dots, "...") for example: int func(int a, ...); If there is a way to access the parameters pass...
[3 replies] Last: Thanks for the replies, yeah seymore that helps =) (by chris)
dynamic array
 
i want make a code for the following scenario write a function int* generate_rand (int length, intMAX_ARRAY) that gets an integer as input and generates a dy...
[3 replies] Last: That's not a difficult task, you just need a loop to fill the dynamica... (by Bazzy)
Functions returning objects or pointers
 
I'm sure this topic would have been discussed many times but I am having difficulty finding the information. What is the best way to return a string or objec...
[2 replies] Last: @nicholasa: I'm not sure what other methods you tried, but you migh... (by jsmith)
C++: fstream. ( deleting and editing)
 
Hi guys. Is it possible to delete a sentence or words from a .txt document through user input? Some help please? I heard that it will be faster to make ch...
[3 replies] Last: Oh I see. Thank you Zaita and kempo. will try debugging again. sha... (by woshihk)
read input into vector?
 
from my last post, the best help suggestion was to use vectors instead of arrays for reading input data of an unkown size (but known format) that said, i a...
[8 replies] Last: well, for some reason, when the input is a 3 row 3 column text file ... (by mariokartlegendd)
word wrap
 
how do I perform word wrap for a certain no. of columns on a file stored on disk, when reading the file to buffer, do I read 1 line at a time, a certain number ...
[5 replies] Last: "ups" as in "ups to you". A sarcastic way to say thanks. (by Zaita)
initialize array of unkown size?
 
is this possible in cpp? if i want to declare an array of undetermined size, my intuition would tell me that i could use something like int array bu...
[8 replies] Last: first, thanks2all for the suggestions so far. this is both for a se... (by mariokartlegendd)
Problem with pow function
 
int i = 1234; double f = 2.0; double c; c = pow ( 10.0, f ); i = i / c; printf ("%d", i); this code is giving the following prblem while compiling ...
[3 replies] Last: Add -lm on the link line to link against the math library. (by jsmith)
by RajNOX
About Eclipse
 
Im not familier with C++ a lot. The main reason is i'm lazy and i dont wana work hard on a language without a proper IDE. I got to know Eclipse is a good C++ id...
[1 reply] : http://www.cplusplus.com/forum/articles/7263/ (by Zaita)
by toni
performance problems
 
I have a problem. i have a performance problem in my code. the code: #include<iostream> class Person{ private: std::string name; std::string add; ...
[7 replies] Last: IMO. It maybe the application design. Each person has a Name and Ad... (by Zaita)
I/O Read/Write Questions
 
Hi, I have put this post up in another forum, but it seems as though this one is more active, so I will try my luck here. Say I am ultimately interested i...
[2 replies] Last: http://www.cplusplus.com/forum/articles/6046/ That article will show ... (by Zaita)
bubble sort
 
Hi ,I have some problems with making this work properly for(l=n;l>1;l--) flag=0; for(i=0;i<(l+1);i++) { if(sort > sort[i+1]) { buf=sort[i+...
[2 replies] Last: Bubble sort as any quadratic sort has two nested loops. Check this tut... (by kdenisk)
passing string data to a class function segfaults
 
We have defined a Tool class that has private variables accessed through get and set functions which are public. The setname function is prototyped as : v...
[4 replies] Last: You have a few problems here. They are related to the way your managin... (by Zaita)
About Destroying and Clearing A Vector
 
Hi, Suppose I have the following vector vector<T> v; and I am wondering what is the difference between emptying the vector with this: v.c...
[2 replies] Last: You clear the vector when you want to continue to use the object for o... (by kempofighter)
"Fun with Coordinates"
 
I also need some help with a program that takes two points given by the user and outputs the following: what quadrant or axes they are located calculates an...
[2 replies] Last: the distance part. thanks! (by discepolo1)
for/while loops....
 
need to write program that asks a user for two numbers and then computes and outputs the sum of all of the consecutive numbers between the two numbers. Like if ...
[1 reply] : A for loop has this structure: for (initialization list;while-like c... (by helios)
Finding smallest in array, assistance needed!
 
I am trying to find the smallest numbers for each row. I can't figure out what I'm doing wrong, as my cout statement seems like it should be after the first fo...
[1 reply] : average is calculated too many times. It should be calculated just onc... (by helios)
February 2009 Pages: 1... 11121314
  Archived months: [jan2009] [mar2009]

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