Beginners - March 2015 (Page 6)

Palindrome Checker help
 
I have the code, I just need to add a loop until the user inputs END. int main() { cout << "Enter a string: "; string s; getline(cin, s); int low = 0; ...
[6 replies] Last: Oh come on @Andy1992. It is beyond obvious that my response was sarcas... (by TarikNeaj)
Can't delete a simple pointer
 
Is there something wrong with this code? Im getting runtime error on line 5 when I'm trying to delete p1 int z = 7; int* p1 = &z; cout << "p1 = " << p1; cout...
[2 replies] Last: Ohh, thank you man :) (by etrusks)
Formatting: How do you display array elements justified to the right in output?
 
Hi, I'm trying to make a program that takes unsorted numbers from a text document, displays them, puts them into an array, sorts them, and then re-displays t...
[10 replies] Last: Got it. Thanks so much for your help! (by closed account N1Co216C)
why does my while statement return a infinite loop
 
My while statement returns a infinite loop while I want the variables to go down until creatures hp hits 0. #include <iostream> #include <string> us...
[2 replies] Last: creaturehp - herostr; herohp - creaturestr; these two statements is ... (by xenovia12)
Finding needle in haystack
 
I am writing a program that is supposed to loop through two strings to find an occurrence of a word inside of a larger word and return the index at which the tw...
[2 replies] Last: Hmm I notice that now. Also, wouldn't I need some type of argument to... (by Tig3r125)
Negatives in while statement
 
Hey guys, how would I make whatever number that goes in the parenthesis that equals negative quit the program? while (tuition != -) Thanks!...
[1 reply] : I believe what you're looking for is while (tuition >= 0) ... (by Ganado)
Copy Constructor not working
 
I know I am doing something wrong with memory, but I can't exactly seem to find that mistake. When I run my copy constructor, a segmentation fault occurs. Can a...
[16 replies] Last: When you call make_lists() in your copy constructor the pointer poly i... (by norm b)
Text wont show up in array loop
 
Hello, I have a program that I am writing that is supposed to use an array and functions to take numbers entered by the user, display them, arrange them in desc...
[2 replies] Last: That worked! Thanks! (by closed account N1Co216C)
Displaying a sequence of letters
 
I'm completely stuck with this program. I have to read in two letters and display the sequence from the first letter to the last. For example: Input: "A C" ...
[15 replies] Last: Maybe input from the command line arguments ?? But he didn't mention ... (by obscure)
Buffers.What are they?
 
So I've just started learning to work with C++ I/O streams and I came across the term 'buffer'. The book I've been reading doesn't do a very good job of explain...
[2 replies] Last: http://www.cplusplus.com/forum/beginner/2503/ (by obscure)
String filter function. HELP?!
 
I'm new to c++ and I got this new assignment. I missed a day in class and now im confused. Here's the question: Please write a function called Filter that ta...
[18 replies] Last: The getline() function reads a whole line of input, not just non-space... (by Faison)
parallel array
 
hello, this is my first time here. I needed to write a program to display the "flower of the month" depending on your birth date. So far it works as intended ac...
[7 replies] Last: You're very welcome man :) Feel free to come back if you get any more ... (by TarikNeaj)
deleting spaces from a string
 
Hello! I've written this code to erase all the spaces in a string, but it doesn't work if i type "a d f s f aa f" in ex.in. Can anyone help me solve this pr...
[4 replies] Last: for(i=0;s !=0;i++) You want to be checking for '\0' and not 0 .... (by fg109)
cout doesnt show
 
Not sure if this is the best way to write a combat engine but its my go at it using classes. But I cannot cout the heros hp and creatures hp for whatever reason...
[1 reply] : Lets see... First of all. \\ this does not show when ran. // not \... (by TarikNeaj)
Confused about header #include
 
Suppose I #include <stdio.h> in my source file. I don't have stdio.cpp in my project. From what I understand, all source files in a C++ project get compiled ...
[4 replies] Last: C++ contains ALL features of C. Therefore, using certain C functions i... (by Faison)
by savanh
question
 
i have this question i dont know how to access to display function and make it friend in member class.and i dont know if my const id number is correct or not ?....
[4 replies] Last: Don't make it a friend function; just make it a normal member function... (by LB)
1D array help
 
Write your question here. I need a program to find the min number in an array, where u input the numbers, don't know how to get it working. here is my progr...
[2 replies] Last: In your array_min function, you compare array to min, but the problem... (by Ganado)
How to install SFML-2.2 into Ubuntu 14.04 and integrate with Code::Blocks?
 
I am using Ubuntu 14.04. I tried a lot to install SFML-2.2 but it never get installed correctly. How do I install it correctly and integrate it with Code::Blo...
[1 reply] : Hi, I'm doing something wrong and receiving an error. But I am not ... (by ne555)
by slour
Linked list
 
I'm trying to make a linked list that will ask the user for the total length then output the values in order on the screen. bellow is what I have, any help woul...
[7 replies] Last: you should try singly linked list before trying doubly linked list. (by anup30)
Writing a Class
 
Write a class My_String which is similar to the class vector but it has character (char) type data. Your class should contain at least: overloaded operator ...
[7 replies] Last: @LB the user said that they'd replaced all uses of name with ptr , ... (by MikeyBoy)
March 2015 Pages: 1... 45678... 51
  Archived months: [feb2015] [apr2015]

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