Beginners - November 2013 (Page 2)

Any more errors in this code?
 
I noticed that yes that important thing is parameters which matters in overloading.. btw these two are overloading functions, what other errors are there? I am...
[3 replies] Last: lanti? (by stuckinthehouse)
array declare must have const value
 
I'm trying to create an bool array that is the size of a variable. When Using the code below i get the error "expression must have a constant value". What am I ...
[4 replies] Last: If you don't need to do any resizing or adding/deleting elements of th... (by long double main)
Data Analysis Program help
 
Hello, I need to write a program that can calculate the rate at which humans get infected with Lyme disease in the span of 10 years. Our variables include numbe...
[5 replies] Last: srand is use to seed the random number generator. If you don't seed it... (by histrungalot)
by hilft
calculation problems, can't get the right output
 
I don't know why i=2 in the code below. Can someone explain how it became like that? #include <iostream> #include <cstdarg> using namespace s...
[1 reply] : line 4: val is specified as passed by reference. When you modify val... (by AbstractionAnon)
HELP! Placing an extra copy of the 4th digit.
 
Hi, my goal is to write a function called doubleFour that places an extra copy of the 4th digit right after that digit in an integer parameter. The problem is a...
[10 replies] Last: Why don't use std::string? i means input, l means length and f means f... (by ngbeslhang)
Struct not declared problem
 
The program debugger says that 'student' was no declared in this scope. The coding program i use is CodeBlocks. #include<iostream> #include<vector> ...
[4 replies] Last: oh, yeah thank man (by XiangzhenWu)
Fibonacci recursion
 
Hey. Please explain how this recursion works. int fib(int n) { if (n <= 0) // Base case return 0; else if (n == 1) // Base case ret...
[2 replies] Last: Well, ok, since you said fib(6) which gives the result 8 was the onl... (by Chervil)
Project out of date
 
So every time I try to compile I get project out of date now i have turned off precompiled headers as another website said would work but of course it did not. ...
[10 replies] Last: Just switched over to code::blocks everything works now! :) (by shiny21)
plz find the problem in code
 
plz solve the problem : Generate the first prime number larger than a given natural number 'number'. #include<iostream> #include<conio.h> using name...
[2 replies] Last: yes , i want to stop the program, when it gives output which is 'the n... (by ABABA999)
&& and || works different
 
when i put "||" program end when x and y = 0, if i put "&&" program end when x or y is 0. can someone explain? #include "stdafx.h" #include <iostream> ...
[5 replies] Last: and what we see ? "||" is or and "&&" is and but in my program "||" w... (by cire)
Console Crash
 
I'm writing a program for class and any help is appreciated. I'm not able to get anywhere because my console crashes and I get no debugging results. When I r...
[1 reply] : `strlen()' expects a null terminated string Also while (count < SIZ... (by ne555)
by txals
Serialization
 
Hi there, Is it possible to serialize/deserialize an object of any class that contains an STL container such a list, vector, etc... I am trying with boost li...
[no replies]
by layanM
help :(
 
can anyone plz help me with this :/ i have to write a program that prompts the user to enter two positive integers m and n where m < n then output all prime ...
[4 replies] Last: Layanm: Start first: if it can be modulated by 2, then it's not prim... (by IWishIKnew)
Code Checker!. Can my code my improvedfurthermore.
 
Before, I start constructing a code for my main assignment. I would like to get an advice on my following code. Is there anything I can improve on this code and...
[14 replies] Last: Promt is a reference parameter, but you have it as cout..prompt. I d... (by cire)
by hilft
Class and function question quick help!
 
what is the different between using ->out() and sub.out() to call the function out()? Also, I would like to know why we use -> to call the function out() as we...
[3 replies] Last: anyone? (by hilft)
by azad90
Invalid char conversion error
 
I'm having problem to run this code involving the following function, I was trying to do conversion from char to integer. It ran well when I didn't use function...
[5 replies] Last: How do you convert char to int? I think you may mean a string of cha... (by Chervil)
A game (I have Dev C++)
 
How Do you make a game with arrow keys , please, i need help. 0 = The Player and # = The Walls ############## # # # # ...
[4 replies] Last: Okay, thanks for the help. ( WASD it is) (by closed account jyU4izwU)
random numbers
 
hello I am trying to make a program which takes an array of ints as an argument and fills the array with random values in the range of 0 to 1000 but all that's ...
[4 replies] Last: thank you this is exactly what I needed this has been very helpful tha... (by andyhack)
by sea711
How to print from a vector?
 
How to print from this vector? //Cars vector <Car> ParkingLot; ParkingLot.push_back(Car(234, 4, 2, EColor::NOCOLOR, "Sibble")); ParkingLot.pu...
[2 replies] Last: The simple way, print from vector<Car>: std::ostream& operator<<(std... (by ShodanHo)
by tavuk
help with do-while loop
 
I'm trying to use a do-while loop to prompt the user until he/she inputs the correct input but when the user does input one of the correct input it still contin...
[3 replies] Last: You are welcome! (by eyenrique)
November 2013 Pages: 1234... 80
  Archived months: [oct2013] [dec2013]

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