Beginners - April 2013 (Page 27)

replace a word in string
 
I have to replace "he" or "she" to "she or he" string he("he "),she("she "); unsigned found = line.find(he); if (found!=std::string::npos) line.repla...
[9 replies] Last: Though this code is not good nevertheless it resolves the task #incl... (by vlad from moscow)
Please help with array
 
I need a program that displays the number of days in each month. When I tried to execute the code, it gave me a black screen with a bunch of fast running digits...
[7 replies] Last: Thank y'all very much. I really appreciate all the help :) (by hanhthai)
by Ali93
Decimal to Binary
 
Hi,,, I want to save the following answers in one integer value. how can i do that ? PS:I wrote this function to convert from decimal to binary. I n...
[6 replies] Last: Thank you rcast for help but I didn't understand what did you do in t... (by Ali93)
fatal error LNK1120: 1 unresolved externals
 
I've worked this over including retyping, I would like some advice as to what I should be looking for in this error. Thank You. Here is the full message: er...
[4 replies] Last: I thank you for your input, you have taught me a programming concept t... (by Marine11)
Does making games improve OOP?
 
I'm learning object oriented programming in C++... I'm not having the interest as i use to do in structural programming. The most interesting thing in OOP I fin...
[2 replies] Last: sure, games are programs after all. so, doing it, you're training. (by Stauricus)
Inconsistent "cannot open source file" error
 
I have been given a video program with several header files and cpp files and I had to create some customer classes with the appropriate header and cpp files to...
[2 replies] Last: Yes they are. I ended up fixing the problem by creating a new program... (by catdance)
Using multiple functions, cin and variable conflicts
 
Hi, I'm having trouble creating multiple functions and using the cin command to input various values.When trying to run compile the code it states that some ...
[1 reply] : * you have a junk comma on line 17 and 30 * your function definition ... (by Giraffatron)
Overloading operator delete[], iostream already does?
 
I've been playing around with overloading operator new and operator delete , and I am encountering a result that surprises me: Suppose I overloaded opera...
[no replies]
by itcsr
File Managment, selecting certain parts from a file to write or edit
 
Im trying to write a program to read a file and determine a secondary index, which will be written to a file, and create lableID file which will hold a label of...
[3 replies] Last: Use std::getline() to read character delimited strings from an input... (by JLBorges)
by lmsmi1
Parsing Commands
 
Is there a better way to parse words in a string to pass as "commands for the console"? I'm making a customized CLI, and have a whole bunch of if statements lik...
[12 replies] Last: I've found a way to do this right, but can't seem to correctly parse t... (by lmsmi1)
by Yom
BlackJack help
 
Hello, I need some help. I am in a C++ class and we need to build a blackjack game. The professor provided some code for us to fill in the blanks. I just can...
[3 replies] Last: Thanks for the comments, but maybe I should have clarified. I understa... (by Yom)
A problem with using getline
 
I am going to run the program until the user say stop, part of my program is using getline, but after the first time, it doesn't work any more. do { ...
[7 replies] Last: Thanks. I'd studied the code in detail but not studied the test data s... (by Chervil)
Help me find bug in this class!
 
Im practicing creating a class like this: Implement a vector replacement that operates only on integers, vectorOfInt (you don't need to use templates like the ...
[2 replies] Last: Thank for helping, i will try :) EDIT: It's worked, thank you very muc... (by kradragon94)
How to check if user made an input in a loop
 
So basically I'm trying to make a snake program. Snake would move in one direction with help of loops, and when user press anything snake would change direction...
[no replies]
Can't run a program about string.
 
The code works, but after I run the exe file, no response. I am trying to read a line, and count how many times does the leeter show up in the sentence. ...
[9 replies] Last: Here is the test code I used to test my logic #include <string> #inc... (by Zaita)
loop problem
 
why does the "multiples++" variable have any effect in the code although it isnt used any where while calculation of the multiples? the programme should only sh...
[6 replies] Last: but doing this just puts it in an infinite loop if anything else is ty... (by Sowmen Das)
print to file from class
 
My code prints out in the console. I want to write the data to a text file. I know how to do this the Main program but this is in my class .cpp file. How can I ...
[2 replies] Last: I've now overloaded my opeartor to std::ostream. How do I now put my o... (by vanessatse)
How to compress file(s) in C++
 
I would like to compress a file and have C++ hold it such as a folder, images, and videos. Is this possible? If so, is there any links or tuts that show how to ...
[5 replies] Last: http://zlib.net/ (by Zaita)
To many choices in choices (1,2)
 
Ok, so like my name suggests i am a complete noob to c++. So here is my delema. Im making a text based RPG game. Where you have many choices to make. My problem...
[20 replies] Last: Here is the main section im having problems with. from line 72 to 136 ... (by Maxthenoob)
I'm getting something weird (1,2)
 
I'm supposed to get this: Testing the FullAdder class. c_in a b c_out s -----------+--------- 0 0 0 | 0 0 0 0 1 | 0 1 ...
[35 replies] Last: To be honest with you, people like me will not respond and help you be... (by Zaita)
April 2013 Pages: 1... 2526272829... 83
  Archived months: [mar2013] [may2013]

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