General C++ Programming - March 2010 (Page 20)

by dims
unable to throw extension of ostringstream
 
Hi! I want to make my own exception class which is capable to accept writing streams into it. The following code compiles on Linux, but does not on Windo...
[10 replies] Last: what class is virtual here: http://www.cplusplus.com/reference/iostre... (by imi)
Building a Linked List
 
Hi, My program reads data (text and int) from an input (notepad) file and stores it in a linked list.I then output the data in another file. No issues with com...
[4 replies] Last: Thanks Imi! Problem resolved. I decided not to use the get member fun... (by lunar97)
String function
 
Hello All, I have few doubt about find_first_of() function. Can I use find_first_of() function with char* ? 1. int main() 2. { 3. char *mystring = ...
[5 replies] Last: Thanks hamsterman . . :) (by shivlakhanpatel)
Dynamical class inheritance
 
I'm looking for a smart way of doing some sort of dynamical class inheritance. This can best be explained with the psudo example below. Think of a base clas...
[4 replies] Last: Thanx! I will work on this. (by MacGoose)
Unable to find the cause of segmentation error in this code
 
Line 71 is illegal, since you haven't allocated any memory for the pointer yet, and are thus trying to deference a garbage pointer. I think you meant to do thi...
[2 replies] Last: Yeah, this seems to happen sometimes >_> (by firedraco)
Invitation to Codefest 10 - Online Coding Festival
 
Hello, With immense pleasure we, on behalf of Department of Computer Engineering, IT-BHU, invite you to participate in an Online Coding festival, Codefest ...
[no replies]
by ALB
How to get the average in an array
 
it a an C++ and it need to accept an array as a parameter and loop though the array adding the array elements and return their sum divided by the number of elem...
[5 replies] Last: buffbill, (i) you probably mean sum+=a Yep i certainly did, Thanks... (by buffbill)
How do I properly overload << ?
 
The code below is what I have now, but g++ won't compile it, and I have no idea what to do. ostream& Board::operator<<(ostream &output, const Board outBoar...
[7 replies] Last: Thanks a lot! (by pasukon)
How to find common element in Adjacency List
 
I have a graph and as you know we can use adjacency matrix or adjacency list to represent a graph. For example, there are two representations of a graph wit...
[no replies]
bool problem
 
void getMinutes (int& minutes, string s) { bool result; do { cout << s; cin >> minutes; result = isValidMinutes(minutes); } while (result == mi...
[3 replies] Last: ^^ thats it! thnx everything works now, thnx both of u! (by risk5634)
[cstring] Search string from pos
 
Hi, basically what I want to do is have something similar to the strstr function, but it is essential in my program for it to start searching at one point, rath...
[2 replies] Last: Perfect. Thank you. (by yoonkwun)
Convert image from jpg tp png
 
Hello every one i want to convert image from jpg to png format !!! any suggestions!!! thanks
[7 replies] Last: That is pretty awesome. There is also a utility on sourceforge called... (by tummychow)
Array of maps
 
Is it possible to make an array of maps?? How can I do that? I want to have a class having a array of maps class X { private: map<const unsigned lo...
[2 replies] Last: I think that should work except that, instead of (10), you should have... (by tummychow)
exe never runs main or any other operations
 
ok so I'm writing a compiler for a language that ive made up, that has c++ like syntax. I've tried compiling it on a unix sun system and visual studios with no...
[7 replies] Last: the problem was that one of the other classes I made has an never endi... (by rodriguez 269)
file stream problems!
 
Okay so I'm completely stumped. I'm writing a program that parses a .txt file and counts the # of words and how many times they appear. My first problem happe...
[4 replies] Last: Some other guy got similar problems. Maybe this is related to http://w... (by imi)
by sporx
making a case for end of line
 
Heres my code below, i am trying to make a case statement so that when it reads that its at the end of a line, it will print out the answer. #include <ios...
[11 replies] Last: The problem is that at some point 55 fails and you don't know about i... (by imi)
getline() function is not returning the expected results
 
I have used this function many times but for some reason I am not getting what I expect. I am writing a parser program, everything is working well but when I tr...
[5 replies] Last: thanks so much!!! I knew that line came from somewhere but I wasn't s... (by kempofighter)
by sporx
reading .txt until end of line
 
I am working on a reverse polish notation calculater. It works for one set of data, however i cant seem to figure out how to make it work if there is more than ...
[2 replies] Last: *scratching my head*.... didn't I just answered this a minute ago? htt... (by imi)
Unable to find a symbol
 
I have an function defined klifo_create. I am making an archive out of it using ar qcv and then linking it with another code. On running I am getting ...
[2 replies] Last: Thanks, had a mismatch in .h and .cpp files. sorry to bother... (by rachitagrawal)
Conversiion from C code to C++ code
 
I am trying to convert a project from C to C++. Since it is not completely written by me, I am facing some problem doing that. I know C++ enforces stricter type...
[13 replies] Last: Heck, I never would suggest to manually change all the definitions in ... (by imi)
March 2010 Pages: 1... 181920212223
  Archived months: [feb2010] [apr2010]

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