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...
Apr 21, 2013 at 5:43pm
[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...
Apr 21, 2013 at 5:36pm
[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...
Apr 21, 2013 at 5:09pm
[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...
Apr 21, 2013 at 4:48pm
[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...
Apr 21, 2013 at 4:35pm
[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...
Apr 21, 2013 at 4:28pm
[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 ...
Apr 21, 2013 at 4:23pm
[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...
Apr 21, 2013 at 3:58pm
[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...
Apr 21, 2013 at 2:45pm
[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...
Apr 21, 2013 at 2:27pm
[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...
Apr 21, 2013 at 2:05pm
[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 { ...
Apr 21, 2013 at 1:59pm
[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 ...
Apr 21, 2013 at 11:28am
[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...
Apr 21, 2013 at 11:24am
[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. ...
Apr 21, 2013 at 10:30am
[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...
Apr 21, 2013 at 10:27am
[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 ...
Apr 21, 2013 at 10:22am
[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 ...
Apr 21, 2013 at 10:08am
[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...
Apr 21, 2013 at 9:43am
[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 ...
Apr 21, 2013 at 9:39am
[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.
Registered users can post in this forum.