Beginners - March 2014 (Page 14)

Numbers to Words
 
I'm not sure on how to do this where you put in number and your suppose to get a word example: 2 -> two ,100->hundered using arrays #include <iostream> #i...
[5 replies] Last: #include <string> #include <sstream> #include <iostream> using namespa... (by Cbasic88)
Using local variables
 
I am still currently working on my program. But I am wondering how do I use the string of arrays inside the constructor with int parameter? What I did was to i...
[5 replies] Last: You should pass it to the constructor, as a parameter. (by LB)
Random number function returns mostly ones
 
I'm making a lottery guessing game where the user guesses a random number between 1 and 100. 90% of my code is working but my random number function keeps retur...
[3 replies] Last: Thanks! One more issue I'm having my code isn't passing a variable pro... (by amatthew3)
Pokemon game
 
I am trying to make a game similar to pokemon but i have a problem.. i want to let the player choose his own pokemon but I have no idea how to set the pokemon a...
[12 replies] Last: Could you post the exact message for your error? Anyway, for the types... (by TwilightSpectre)
random number/function
 
I am getting a couple of errors in this program...please helpp.. //generate 5000 random number. //ask the user for the number they want to search in th...
[6 replies] Last: i am confused because to the program looks right and its not working. (by syedvasty)
by rm5393
Call function from void
 
Having problems calling void findwinner into main function. Any help will be appreciated. #include <iostream> // listing all header files #include <fs...
[5 replies] Last: I matched my function prototype but now it only spits out the winner o... (by rm5393)
Creating a class for 3D vectors?! Methods in public for display and test.
 
I want to define a class Vector, representing a 3D vector with the following methods: display - to display with <<cout>> an object Vector; e.g. 1.0 3.0 5.0 ...
[3 replies] Last: I prefer to overload operator << for outputting that way you can do ... (by giblit)
by angelk
C++ call method with template 'Error'
 
Hello everyone, I'm having problems with the linker. It gives me the following error: [Linker error] undefined reference to `bool Polis :: deleteEdifice <Min...
[5 replies] Last: //.h file class Polis { public: //...constructor etc... template <t... (by ne555)
Double Wrong entry output instead of one help
 
Sometimes code outputs twice wrong entry. What is wrong? edit: fixed lenght to length #include <iostream> #include <string> #include <cctype> #include <al...
[2 replies] Last: Ha-Ha... although now sometimes outputs twice wrong entry... (by lolek4551)
by rshoe
How to return a total for two arrays
 
I am working on a function that takes two arrays and adds them up for a grand total. Here is what I am trying to do: write a function in full, including ...
[2 replies] Last: Thanks Chriscpp for the quick reply. The code you sent worked great. ... (by rshoe)
Nodes
 
Hello again! So, I'm starting to learn about nodes, and I just don't get them. Specifically, what they do, why they work, and how to use them. Any help would...
[7 replies] Last: Thank you all so much for your answers! I think I've really gotten the... (by geniusberry)
by Gasper
while (true) loop
 
I am writting a program that gives us the whole and the decimal part of the number given by the user. The program then asks the user if he wants to restart the ...
[4 replies] Last: Thank you for your help! (by Gasper)
by ASQ19
Quick Help
 
I've a lengthy program that calculates t_final and needs to do the following if statements that include an integral, I tried to attach a pic but i could not. An...
[3 replies] Last: I have no idea, what formula are you trying to use? You can't just giv... (by LB)
Do integral sum
 
Exercise: Assuming i is an int and d is a double , write the expression i *= d so that it does integral, rather than floating-point multiplycation T...
[3 replies] Last: The assignment you quoted asks for integral multiplication, not integr... (by LB)
array help
 
Hi im new to c++, as in like 4 weeks new, and need to create a program that will run a 1-D array to read in a list of numbers (1-100) and print them, if it is n...
[6 replies] Last: I don't know what you're asking. (by LB)
by Kuma97
My calculator doesnt run!
 
There´s an error in line 70 that i can´t find. I think that everything is alright. //Calculator by Enrique Junchaya #include <iostream> using names...
[2 replies] Last: LOL How couldn´t I see it .-.! (by Kuma97)
Validate Input, Fix Increment, and Bool Issue
 
Hi, so I'm in my beginner C++ class and we are supposed to write a program that is a high-low guessing game. It asks the user to guess a random number between 1...
[no replies]
'segmentation fault'
 
There are no errors when I compile my program but when i try to run this it says segmentation fault I am a beginner and we just learned files so i am clueles...
[1 reply] : #include <ostream> This is pretty unnecessary. int n, median, ar... (by Daleth)
symbol not found
 
Whenever I run this code, I get this error: Undefined symbols for architecture x86_64: "Producer::lifespan", referenced from: Producer::init_produc...
[2 replies] Last: Because static members area shared among objects, they are not defined... (by Daleth)
Undefined reference to...
 
When I try to compile this program in linux I get the error 'Undefined reference to' and then it gives me three functions all in the nodes_LLoLL file. I am not ...
[2 replies] Last: Thank you so much. I knew I was missing something very simple. (by tls1019)
March 2014 Pages: 1... 1213141516... 79
  Archived months: [feb2014] [apr2014]

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