Beginners - March 2009 (Page 24)

istringstream
 
I need to extract all the sequences of non-empty characters (i.e. words) from all lines in a ascii inp_file. The following code does not go beyond the very firs...
[3 replies] Last: Visit the Reference section of this site. It has everything that you ... (by seymore15074)
fstream
 
Hey so I'm still learning in programming, and I was wondering how to apply fstream when reading and writing to a file. For example, say I have the following co...
[4 replies] Last: I suggest you a vector than an array as a vector can easily change its... (by Bazzy)
by Tuthon
calculate a function
 
Hello I'm a beginner Can you help me to write a program to calculate a function while lead in "x" and "n" In advance thank you.
[16 replies] Last: Thank you man.I hope be right.Because I nothing understand of C++ , ... (by Tuthon)
A few issues with my first (physics based) program
 
Hello all, I am doing this project for a class and it is due in a few days.. This is the first "easy" part and there is a much harder second part that I am rea...
[3 replies] Last: I just skimmed for things which might be a problem. This stuck out, b... (by Disch)
Member functions.
 
Hello. Me and some mates thought that it would be good practice to write a text based rpg(pretty stupid idea maybe:P). Anways the program uses alot of switch...
[6 replies] Last: I encourage you to try out the beginner's web site: http://www.cppbegi... (by Ganellon)
How can I determine if a key in std::map doesn't exist?
 
"How can I determine if a key in std::map doesn't exist?" IE std::map<string,string>
[2 replies] Last: myMap.find( "Key" ) == myMap.end(); // true == does not exist ... (by jsmith)
by ghamon
boost::variant accessing the objects
 
class GH_CollisionDetection; class GH_HeadTracking; struct application{ std::string id; std::string path; boost::variant<GH_CollisionDetection *, GH_He...
[1 reply] : Your second and third errors are because you cannot call appObject.s... (by jsmith)
another permutation question -- repeats
 
I'm familiar with the next_permutation algorithm, and have used it successfully (hooray for this c++ beginner!) with permutations not involving repeated element...
[3 replies] Last: permutations with repeat is an oxymoron; they are called combinations ... (by jsmith)
do while needs double command to exit
 
Program is working fine (only with the + operator for now) but why do I need to type "X" two times to exit? The do while should stop the first time when user ...
[7 replies] Last: if ((operation == '/') && (number=0)) That is a classic mista... (by jRaskell)
by encon
encryption!
 
i have an assignment which asks me to write a program which reads in a text file and encrypts only the letters, and the output reads 13 letters out-of-sync and ...
[1 reply] : Using ASCII codes should work: http://www.cplusplus.com/doc/ascii.h... (by Scipio)
Where can I find the header files?
 
Hi all, I would like read some of the "include" source files but where can I find them? In what directory are they normally stored? I'm using Microsoft Visua...
[1 reply] : In VC++ IDE the easiest thing is right clicking on the header name (in... (by Bazzy)
by mudd2
Libraries
 
How do you create a working library?? What must be inside it?? And how do you use getline?
[1 reply] : A library is created as a program but it should be compiled as library... (by Bazzy)
by koliva
File size discrepancy
 
Hello everybody, I have a uncompressed bmp file. The resolution of this file is 800x800 and 24 bit. So, my file size should be (800x800x24)/8 = 1.920.000...
[1 reply] : it could be the palette stuff, needed when bit/pixel < 16 (by Bazzy)
printing out message n times! (continued)
 
I need to modify the following program so that after a correct n has been input, it prints out n times a message such as "Hello". I am aware that I first hav...
[no replies]
FUnction.........
 
Write a function to accept a string from the user and return number of words starting with any vowel?
[1 reply] : Stop posting homework assignments, no one will do them for you. (by Return 0)
C++ Program
 
Write a program to count those words from a string whic contains letter 'a'?
[no replies]
control divisions...
 
I have a program and my code is working fine with all the operators except I dont know how to take into account of the fact that the user could select division ...
[1 reply] : number==0 rather than number=0 (by kbw)
Loops............
 
Can anyone explain me the WHILE , DO WHILE and FOR Loop with an example of C++ Program?
[1 reply] : You can check them out here: http://www.cplusplus.com/doc/tutorial/... (by andrewt)
Function headers, arguments and storing results to arrays
 
Hi there, I'm trying to write a program that calculates the probability distribution for different initial conditions of a population model. The probability ...
[no replies]
by tition
How do you "hide" only some of the public members of base class
 
Moved to: http://www.cplusplus.com/forum/general/8431/
[no replies]
March 2009 Pages: 1... 2223242526... 29
  Archived months: [feb2009] [apr2009]

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