Beginners - March 2009 (Page 22)

string variables and values problem
 
When the user select chocolate for icecreamFlavor, since it is among the same possible values for sa...
[11 replies] Last: Hi Bazzy thank you for the hint... I changed my code and the program ... (by andrewt)
by token
Comparing Strings [example]
 
#include <iostream> #include <string> using namespace std; int main() { string firststrin...
[1 reply] : Your question is? Btw: You can also use == for string comparisons. (by eker676)
by Hazer
Copying binary files
 
Hi everyone! I have a little problem. Code: #include <stdio.h> #include <iostream> using names...
[2 replies] Last: Thanks. I used feof() and EOF before but I thought they are epual. (by Hazer)
Default parameters in a function
 
Hi, I just wondered whether you should define the default parameter in the function prototype or ...
[7 replies] Last: OK, thanks. (by user name)
by Azrad
easy way to remove unwanted characters from a string?
 
I want to remove every character from a string except for a certain list of characters. I'm sure thi...
[2 replies] Last: For a general solution, I'd go with // remove_matches: removes ... (by jsmith)
Returning a char* array?
 
I am new here. I was creating a program, and I needed to return a char* array from this: http://w...
[2 replies] Last: Oh Thanks. I started C++ programming a while ago, and I just started t... (by PickleMan)
by Prissy
some questions about reference and array
 
Q1: EG: int array ; Can I use: int &reference = array; and then sth = reference...
[1 reply] : Q1: you can do this: int array ; int (&reference) = array; sth... (by Bazzy)
ASCII and special key miss function?
 
During my exercise: i found that my ASCII code output is ? or strange chinese word after 130(base o...
[2 replies] Last: how are you reading them? as a char? Try using unsigned int. char onl... (by grcunning)
Determining the roots of a cubic polynomial using N-R method
 
Hello! Can anyone explain to me how to use the Newton-Raphson method to get the roots of a cubic pol...
[5 replies] Last: Okay, now I have this: #include <iostream> #include <cmath> using ... (by shoubie)
"Understanding the context" of my assignment
 
I am rather confused on interpreting this assignment. I am supposed to read "10 strings from cin, st...
[1 reply] : Repeat 10 times: Read one string. Use a binary search on the... (by jsmith)
Trying to save to file using switch case
 
I'm trying to get someone to pick from a list of classes, and have that class saved to a file, but I...
[3 replies] Last: YES! Thank you so much. I missed that entirely. Thanks a lot! (by Fallen03)
Screen Options
 
Greetings everyone! Can anyone provide me with some tips on how to make the current view for inst...
[1 reply] : Specifically how to do this can vary depending on what platform you're... (by Disch)
changing numbers in an array
 
(that's not the best title...sorry about that!) I have an array with the numbers 1,2,3,2. I want...
[9 replies] Last: A template is used for a function or a class so it can be more generic... (by Bazzy)
decompress data from file
 
I have stored some data in a file.txt which is hello ho3w2 are you. How can I open this file in c c...
[1 reply] : I think I already gave you the code for compression? Yes? You just h... (by kevinchkin)
definitions of Arrays, Functions, String and Matrix
 
Hey ALl. I have an exam tomorrow . I just want the definitions of the given with a nice example. Ple...
[1 reply] : Try the tutorials http://www.cplusplus.com/doc/tutorial/arrays.html ... (by Bazzy)
by masiht
call of reference and call by value question
 
Hello,I am studying call by reference and call by value.I have studied the tutorial here .I have bee...
[2 replies] Last: thank you ! I am going to play with more programs like these. (by masiht)
float output and percentages
 
Code: float a=15, b=6,x; x=a/b; printf("%f %", x); I want to print 2.500 %(percent) on the scr...
[1 reply] : Try this: printf("%0.3f %%", x); if you can use C++ you can use thi... (by Bazzy)
Please Give ATTENTION...
 
Anyone can help me solve me these programming projects? I don't know how to do it.. Can someone giv...
[1 reply] : Do your own homework. People here don't mind helping if you get stuck... (by Disch)
Syntax of new
 
If 'Test' is an ordinary class, is there any difference between: Test test* = new Test; and Tes...
[3 replies] Last: Well spotted, I missed that! (by kbw)
derived classes - accessing private members
 
This is a review for a test. I have attempted numerous things and maybe I've just been trying too lo...
[2 replies] Last: Thanks so much.. I haven't had any sleep and I don't know how I could ... (by lizzygarcia02)
March 2009 Pages: 1... 2021222324... 29
  Archived months: [feb2009] [apr2009]

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