Beginners - March 2014 (Page 18)

by Clutch
While loop not executing condition correctly
 
Hi all, I've written the following code but cannot understand why the loop ignores the condition. When the program runs and numbers above 5 and below 0 are e...
[6 replies] Last: Thanks for your help. Much appreciated. (by Clutch)
find and replace from a file
 
hello i want to enter a file and find a word at the file a whole and replace every on of it with anther word and this i was made it to find a word from a file ...
[1 reply] : Note: This looks like a followup question to http://www.cplusplus.com/... (by keskiverto)
cin.getline hates forward slashes?
 
Hi everyone, I am doing an assignment where I am reading from a textfile via input stream. It is a database of title, first name, last name and position in the ...
[1 reply] : I don't think the forward slash is the problem. You could replace the ... (by Peter87)
Binary Search is drunk
 
My binary search function is drunk. Some numbers work, some don't. I believe the problem lies in the binsearch function. #include <iostream> #include <io...
[1 reply] : Shouldn't you return position instead of max ? (by Peter87)
ASCII ARt triangle
 
Hey guys I have a problem with the following code, please help. Write a program that outputs an upside down ASCII-art triangle given the number of lines t...
[2 replies] Last: @ CheyezaM The first row is easy: figure out how many underscores yo... (by booradley60)
Printing names from strings
 
So I am trying to write a program that reads in a first middle and last name and then returns in the name in the form: Last, First MiddleInitial. (with the peri...
[2 replies] Last: I understand what you did with the first program with counting spaces,... (by chuebsch)
by Aarix
Please recommend me a book
 
Hello everyone. I'm going to try to get aggressive with my studying in programming so I need a good resource. I've looked in a lot of places and the biggest iss...
[3 replies] Last: Thank you both for the help. I love how supportive the site is. (by Aarix)
Stacks Help witohut class - urgent
 
Hello, can anyone help, i will post the code below, but i have been given an assignment to create a stack and implement it showing test plans and debugging, but...
[2 replies] Last: thank you :D! (by connor grimes)
Error in statement "for"
 
I get an error when i code C++. I used statement "for" . But when i debug, the program don't exit the loop and I see the notice appear in below. I want to know ...
[2 replies] Last: oh, i think i knew what i have to do to fix it. Thanks so much. (by nhatnamtamtra)
Linked List, Addition between the 2 Expressions
 
Hi. Here is my source code asking the user to input 2 polynomial expressions. Now, I am stuck on how to do the addition for both expressions given by the user i...
[2 replies] Last: Thanks for the hint. So from the main I called a function which is add... (by satoshi)
Using vector to store two different class information
 
I am basically trying to get the vector to store information entered by the user and then display it. Having trouble displaying information. Here is the code th...
[6 replies] Last: Thank you Matthew, it works now and i will update that now. (by generic2709)
Linked list append
 
I made a linkedlist class and everything works except for the append function. When the program exits and the destructor is called, there is an "assertion error...
[1 reply] : Two points: void T::append( T attach ) { // make this point to nodes ... (by keskiverto)
learning open gl or not
 
Hi. Im just learning cpp. And I easily temp to study diffrant things. One of them is open gl (or directx). Do you think its necessery for me to learn it? Is it ...
[6 replies] Last: thanks. I think I should enter SDL world! (by fmehri76)
by enjoii
bool and if statements
 
im still having trouble understanding bool specifically the and ,or , and not aspects of it also a bit confused with the if statements if anyone could further ...
[2 replies] Last: These links might help you understand better: http://www.cplusplus.com... (by giblit)
Write a for loop that outputs the days of the week
 
Write a for loop that outputs the days of the week, each on a separate line, starting from Saturday and working backward to Sunday. I think what I have is ...
[5 replies] Last: Pls am kobina, am new in computer programming and i will be needing yo... (by kobina11)
Help with reversing string
 
i cannot use pointers and i have to ask the user to enter it and store into an array, then replace the content of the string in reverse and save into another ar...
[3 replies] Last: Reversing a string can be done in-place: char mystr ; std::cin.getli... (by Smac89)
HOW TO BREAK A LOOP FROM A FUNCTION?
 
Id like to know how to break a loop of the main function with another function, I read a little of answers but none of them tells me if it is possible to break ...
[8 replies] Last: no problem (by Little Bobby Tables)
Combat not working correctly in text RPG
 
Hello, I am working on a small text-RPG. The problem I am currently having is when I encounter an enemy I attack once and then the combat ends. It is not enoug...
[4 replies] Last: In Player.cpp in bool Player::attack(Monster& monster) try adding re... (by Mechennyy)
how to translate the for loop to do-while or while loop?
 
Write your question here. guys can you translate this for nested in do-while or while loop.. thank you very much.. #include<iostream> using namespace s...
[4 replies] Last: thank you very much.. (by aliasdan30)
Binomial Distribution
 
For this program I'm supposed to write a code that displays a binomial distribution as a simple text bar graph something like this: Number: 4 1 @ 4 @@@...
[1 reply] : what binomial distribution is? You probably wouldn't have learned it... (by giblit)
March 2014 Pages: 1... 1617181920... 79
  Archived months: [feb2014] [apr2014]

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