General C++ Programming - April 2009 (Page 6)

by um0123
downloading souce code problem
 
i went to the source code page, and downloaded the .zip file for the triangle program. its one of the programs in the first box on the source code page, but whe...
[1 reply] : You found a *WORKING* zip on here? :O:O:O (by closed account S6k9GNh0)
by pass
sink the ship game -battleship
 
hey C++ people! I need little help here. I am trying to make a battleship game. I have finished some of parts but it seems too much for me. I marked some of poi...
[4 replies] Last: thats why i replied !!! :) you can post here if its small or else m... (by writetonsharma)
problem with string break end with ".?!"
 
Hi. i have some problem with my prog.I need to break the string in txt.file. like in the txt.file there is a string sentence: How are you? I am fine. ...
[5 replies] Last: getline(infile, str); vector<string> strings; int pos = 0; for(i... (by eker676)
multidemensional dynamic array
 
My instructions are to create a program that will ask for a file of test scores and average each students score then average each test score. I have got every t...
[6 replies] Last: I figured it out student and test needed to be initialized in side of ... (by ltrane2003)
question on string
 
got a question. y i unable to break the line when it reach ".,?" ? when i compile only the first line break.how i able to break the second one? i try alot of me...
[4 replies] Last: i cant figure where i go wrong. the output is wrong. anyone out there ... (by snoopy198520)
Can't overload ostream insert operator for template class?
 
I have a list class that I wanted to be able to output using <<, but it always gives me an error. I tried doing something simpler for a test and got the same er...
[2 replies] Last: Also, as a matter of good practice, operator<< should take MyClass by ... (by jsmith)
how can i make this better..
 
Consider the problem of determining whether an arbitrary sequence x1, x2…….xN of N numbers contains repeated occurrences of some number. for (int ...
[3 replies] Last: Thank-you, both of you.. :) (by hugsnbugs)
by wolfkv
g++: command not found on terminal.app
 
For a while I've been using Terminal to compile and work with c++ code in a first semester class at NCSU. The other day, something went wrong with the computer...
[4 replies] Last: try login from a different user.. and see if all is working well!! (by writetonsharma)
what is this statement saying?
 
Consider the problem of determining whether an arbitrary sequence x1, x2…….xN of N numbers contains repeated occurrences of some number.
[2 replies] Last: k.. wow.. m stupid.. thanx for you help.. :) (by hugsnbugs)
Keeping a value stored
 
I have a matrix and I need the value to be stored as long as the program is running. Example of of my program (2D-array) I input 2C from the keyboard output...
[3 replies] Last: Active portion of my code do { // beginning of do while loop int ... (by RF81633)
quadrant please
 
ok i have a question that ask user to insert 2 digit (X and Y) then base on user number, it will give an out put if its on quadrant,1,2,3 or 4 this is ...
[6 replies] Last: Thanks firedraco :) (by StormRoBoT)
by vijkrr
How to convert a char * to unsigned char *
 
Hi, I'm facing a problem in converting a char* to unsigned char* and vise versa. eg: char *final = new char ; strcpy(final,"hiiiii"); unisgned char *inpu...
[2 replies] Last: I think what you want is strcpy((char *)input,final); (by helios)
by vRltwE
Working with ascii data files
 
Hi, I am working with ascii data files, in fact they are matrix stored in ascii data files. Someone can recomend a tutorial or something like that? Tha...
[2 replies] Last: I have a matrix (double values) stored in an ASCII data file 11.33 ... (by vRltwE)
What is stderr? Where Can I Find It? What is cerr?
 
// // cerr example // #include<iostream> #include<fstream> void main ( ) { using namespace std; // open the file "file_name.txt" // for read...
[3 replies] Last: Thanks.... (by f ben isaac)
by vRltwE
Set the PATH to read files from disk.
 
Hi, I am dealing with the proccess of read a file from disk. For that I use iFile.open("/home/cristiano/matrix3.dat"); There is some particular w...
[3 replies] Last: Use setenv () http://linux.die.net/man/3/setenv Keep in mind that... (by Duthomhas)
by vRltwE
Troubles with "cout << (float) iFile.get() << " ";"
 
Hi, I am reading an ASCII file. The file contain a matrix of values like 11.33 12.33 13.33 14.33 15.33 16.33 17.33 18.33 19.33 When I use cout <<...
[7 replies] Last: Mission accomplished guestgulkan, Special thanks for your solution,... (by vRltwE)
by Disch
Seeking inheritance design ideas/feedback
 
I'm seeking design ideas: I'm working on a sound mixing library. The general way I have it set up is there's a generic Sound abstract base class, from whi...
[6 replies] Last: So, are Mixer, AudioOut derived, etc. all library objects or can users... (by PanGalactic)
by vRltwE
Pass a stream to a method
 
Hi, if a file is open in read mode at main(), then I want to call a method() to read something in the file. How can I pass the stream to the method? I thi...
[12 replies] Last: cstrieder: No, but you can read one element at a time and call push_b... (by PanGalactic)
overlapped socket question
 
Hi everybody, I have a multithreading application with sockets communications. One thread communicates with other machine in order to receive data. Other thr...
[15 replies] Last: I understand the difficulty in explaining what you have. Lets look at... (by kbw)
string breakline
 
i have problem with the break line. i got a string sentence. not char. string sentence = "How are u? I am fine." how can i break the line to: How ar...
[2 replies] Last: but i problem is that it is a txt file and i have to break the line. ... (by snoopy198520)
April 2009 Pages: 1... 45678... 20
  Archived months: [mar2009] [may2009]

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