Beginners - October 2015 (Page 33)

C++ ring Buffer
 
I am wondering if anyone have some tips to how I can make a ring buffer in c++. It's need to be able to store strings. This is really important to me so all k...
[9 replies] Last: > ring_buffer( std::size_t cap ) : buffer(cap) {} Initialise the bu... (by JLBorges)
how to end the loop by input a string to double
 
This is my homework. I am asked to write a program that let user input several numbers and then calculate the average of them. I finished most of it, but i don'...
[1 reply] : You're making things way more complicated than it needs to be. The onl... (by integralfx)
C++ primers Ex 1.11
 
Exercise 1.11: Write a program that prompts the user for two integers. Print each number in the range specified by those two integers #include <iostream>...
[6 replies] Last: Don't miss the next gripping episode! (by closed account 48T7M4Gy)
Uninitialized Local Variable Error
 
Problem; I'm getting an "Uninitialized Local Variable" error from VS. My problem before was the program didn't call the setTotalCost function so the main progra...
[1 reply] : void setItemNumber(int) { ItemNumber = ItemNumber; } This just se... (by integralfx)
Really confused
 
For my C++ class Here is what i need to do http://puu.sh/kJFbm/de922c4367.png i have this so far and not sure if im going in the right direction #include <ios...
[no replies]
Coin flip simulator repeating until heads appears
 
So I'm writing a program that pays out an amount 2 n where n is the number of the toss in which the first Heads appears. I'm pretty sure I have everything corr...
[8 replies] Last: This topic might help. http://www.cplusplus.com/forum/beginner/175514/ (by integralfx)
Declaration inside while
 
Why I can't declare variable inside while loop like if or for loops? int main() { //sum = 2+4+6+8+... int sum = 0; while(int x<=100){ ...
[6 replies] Last: You can use a declaration there but it appears to me it will not be ... (by closed account 48T7M4Gy)
function does not take 3 arguments
 
Now my program could not be complied since it says my mcnuggets function does not take 3 arguments. I don't even know why, please help! thanks. #include...
[2 replies] Last: Thanks I got it fixed now. New question now. What does * and & mean? ... (by jekaterina)
Trouble with Find and Replace
 
I am having trouble getting the words to print before lazy(line 22) and getting the new sentence to print. Also can someone reference me to how if the word that...
[1 reply] : You're using a function std::string::find . Refer to it's documentat... (by cire)
by Cat32
trying to write a class
 
I am not sure what my question is. I don't know enough to know what I don't know. I have spend 30+hours trying to figure this out. I keep getting the same error...
[1 reply] : The x and y should be capitalized. setxCoord(0); setyCoord(0)... (by Yanson)
Switch case help me please
 
Hello, when I run "option 1" in my switch case it, once i select the option the program executes the case but then ends; I'd like to know how to make it go back...
[4 replies] Last: #include<stdio.h> #include<conio.h> #include<cstdlib> int main () ... (by goon rider)
Please check if Classes Constructors and Functions are good
 
Last time i needed help this was the best way i got help from, there is so many smart guys in here, so i need some help now. Write a program using classes th...
[no replies]
Location of the keyword 'const' and its meaning
 
Hello, I am having a trouble recognizing the meaning of the keyword const depending on its location. There are three const in the following code. Can anyo...
[2 replies] Last: This might be of help in determining which const means what and wher... (by YFGHNG)
Y/N Loops
 
I need to make a loop that will make this program run again if the user chooses to do so but so far it hasn't been working out. I've been trying to make the loo...
[4 replies] Last: Line 169: extraneous response variable, unneeded. Line 175: extra ... (by YFGHNG)
Accessing a .txt file and finding the number closest to 200
 
Hi, in this program I am to open a .txt file and find the integer that is closest to 200.The code is working;however, the results is either giving me the last o...
[3 replies] Last: welcome (by Ericool)
Need help with an "if" statement
 
delete
[4 replies] Last: You don't need two variables H and T , you just need one variable t... (by LB)
Weird behavior in ncurses
 
I'm trying to use ncurses to create a text editor, but I'm running into an issue when I try creating a menu. I create the menu just fine but when I go to chang...
[no replies]
by Maco10
Linking static libraries
 
Hi everybody! I am a beginner with C/C++ development. I have made my own sample library and I want to use it in my main file. All my code is: Sum.h: #ifn...
[3 replies] Last: #include "Sum.h" int add(int n1, int n2) // not int suma(int n1, int... (by closed account E0p9LyTq)
by fguy
References
 
In the book I am reading, it says that the type of a reference must match the type of the object to which the reference refers. If that is true I would expect t...
[2 replies] Last: For the first version of the code ri is bound to a temporary object of... (by cire)
Read Multiple Lines And ADD.
 
Hello, I am trying to read the input file that has both Variables associated with integers. All I need to do is add the variables together. Basically I got...
[10 replies] Last: Nvm finished it, thank you for your help!! (by funnyguy1)
October 2015 Pages: 1... 3132333435... 57
  Archived months: [sep2015] [nov2015]

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