Beginners - March 2010 (Page 28)

while(*(s1++)=*(s2++))
 
Hii , I have this function that concatenate two strings : void string_cat2(char *s1,char *s2){ while(*s1) ++s1; while(*(s1++)=*(s2++)); } my que...
[16 replies] Last: I guess that's what I get for rushing. Lesson learned. (by chrisname)
Problem with char arrays and switch statements
 
I'm having a problem with using char arrays. Here's the function: int getFormat(){ while(true){ cout << "What movie format would y...
[3 replies] Last: Yeah, I can easily how strings are preferred over char arrays. However... (by closed account jwC5fSEw)
void functions
 
hello! for an assignment we have to use void and value returning functions. we have to calculate the metabolic power of an animal. here is my program: #incl...
[6 replies] Last: hmm hmm hmm.. ya well if i do that it doesnt give me the right answer,... (by illingas)
getline function is giving unexpected 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...
[1 reply] : Duplicate! Don't respond to this one. It is in the general C++ forum... (by kempofighter)
Problem with returning values from a function
 
I'm making a struct that holds information about a rented video. I want a function that asks the user which format he'd like (e.g: 1. VHS, 2. DVD, etc), takes t...
[8 replies] Last: My pleasure. :-) (by Danielsson)
by japh42
Enum and Switch Values
 
I found this topic covering my problem... http://www.cplusplus.com/forum/beginner/3840/ However, the solution given has brought up a question. I ju...
[9 replies] Last: You missed the point in the original thread. An enumeration is a p... (by Duthomhas)
by devis
why cpu usage 200%
 
Running a (c++) game application process (server)(multi threaded) under RedHat linux version 2.6.18-8.1.15.el5, which is using mysql db version 5.0.27.GUI is wr...
[1 reply] : How does one reach 200% of CPU usage? It sounds like your C++ proce... (by Duthomhas)
by Null
uninitialized references
 
Hello, I have a little problem with classes. Code: class CC { public: int &a; CC(int &_a) { a=_a; } void print() { cout <...
[2 replies] Last: Thanks! (by Null)
by Osor77
why is "try" necessary
 
Hi guys, having read quite a lot of documentation about it, I still can't see clearly why we need to enclose in a try statement the code that needs to be gua...
[2 replies] Last: Thanks imi, I kind of gathered that "try" was just a marker, but I... (by Osor77)
by oman
No thing in the screen typed
 
i have this a part only of a hole program i read from a file and i cout it no thing typed in the screen #include <iostream> #include <fstream> #include <s...
[5 replies] Last: i have already string in the both files but no way it does not print a... (by oman)
Fstream an Array into file and then finding it's Average and Standard Deviation
 
Problem solved, thanks. Any help will be much appreciated. Thank you.
[4 replies] Last: In the moments() function you are using local variables (ave and std... (by guestgulkan)
Strange copy constructor behaviour, part 2
 
Hello again. I''m having another problem with the assignement I asked about yesterday. I have two classes, ShipLoad and Player. Every Player object contains...
[11 replies] Last: Yeah, OK. That explains it. I better think this over once again. My ... (by hadoque)
New to C++ need advice on a program.
 
Im new to C++ and im stuck on this program. Ive done some of it but im having problems knowing how to add the "Y or N extra credit points"..Can someone please g...
[2 replies] Last: [quote=imi ]I like the part with "subtract 10 points for not following... (by admkrk)
Beginner problems
 
I do this so far: #include <stdio.h> #include <string.h> struct n_rowdata { char m_name ; char m_enable ; char m_pointer ; char m...
[no replies]
executing a program and arguments from the command line
 
So, i have an assignment and I'm trying to get the program to execute, read and write to files from the command line in cmd. I can execute the file, but I ca...
[7 replies] Last: Figured it out. (by oghmaosiris)
Using ifstream and ofstream with arrays in C++
 
Problem solved, thanks guys.
[4 replies] Last: When you are talking about std::streams, Your i.e., are you sugges... (by robertlenos)
Rounding off the number (money) and showing
 
Hi I'm a begginer of C++ and I have been trying to make my program to round off the number for money. For example $12.65515 then it will become $12.66 and $0.01...
[8 replies] Last: Never seen the sstream do you have a link I can check out to learn mor... (by OnymousIllusion)
can't find logic error in program.
 
Find a word game, we have a table of characters, a size of the table, and a word to find in every direction of the table.e.g. size=4,4 searchFor=and dnal m...
[9 replies] Last: why are they constant? edit: ok I got it: int i=1; while (true... (by gcampton)
by Atraii
Cin and Spaces
 
I'm working on a project that has been working out so far. The problem i ran into at the moment is that my program needs to be capable of accepting spaces. I di...
[2 replies] Last: The getline() that's not a member function is slightly better. http:/... (by helios)
Allegro and Visual Express 2008
 
Good day everybody. I've recently downloaded Visual C++ Express 2008 edition, and am currently trying to install Allegro 4.4.1 to it. I've been Googling and rea...
[3 replies] Last: Actually, I own C++ For Dummies (and the pocket reference)and a number... (by DeadH34d)
March 2010 Pages: 1... 2627282930... 34
  Archived months: [feb2010] [apr2010]

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