Beginners - November 2011 (Page 50)

by nebula
Functions: A Little Question.
 
Hello guys. I just wanted to know the difference between declaring a function this way: #include <cstdlib> #include <iostream> using namespace std; ...
[2 replies] Last: Thanks you @sohguanh I also agree with your answer (by Dinesh subedi)
virtual functions?
 
Hi everyone, My problem is that I am trying to use a copy constructor and an assignment constructor on an abstract class. these are required as an ...
[11 replies] Last: No worries (by jim80y)
Loop Issues
 
So for my very first program I decided to make a quadratic formula solver. It works well but I am having problems with my loop. For some reason it repeats no ma...
[4 replies] Last: You'd use strings the same way you use the int, but with a string vari... (by mzimmers)
by doilin
Project Ideas
 
I'm flat out of ideas. I have made a calculator that works much like a TI-83 without the graphing features and apps, and I am working on a Go Fish game, but for...
[6 replies] Last: Hello doilin, The reason your function sometimes does nothing is beca... (by x Brian x)
by Yezman
File I/O Practice Exam 2 Questions
 
These two questions are from a practice exam I took. The * denotes the correct answer. 14. What does the following print? Assume all the appropriate header f...
[2 replies] Last: I figured out 15. I thought the while (infile >> num) was illegal, but... (by Yezman)
by nebula
Functions with strings as parameters.
 
Hello guys. I'm trying to do a program that asks for names for a couple of players of a certain game. I write the following code: #include <cstdlib> #inc...
[3 replies] Last: It will print out XXX and YYY because you have initialized J1 and J2 t... (by Andre Ekblom)
console closes down
 
#include "stdafx.h" #include <iostream> #include <string> #include <fstream> #include <cmath> #include <iomanip> #include <stdio.h> using namespace std; ...
[2 replies] Last: Useful link: http://www.cplusplus.com/forum/beginner/1988/#msg7682 (by Duthomhas)
Program is not Outputting =\
 
I'm currently working on a school project in which I have to create a class for this client program. I commented out all the code I'm not currently using to te...
[12 replies] Last: You don't have an exit call in the fraction class constructor, do you... (by Aerospace91)
If else trouble
 
I can't seem to find the errors in this code. It's saying I have an else without if statements, as well as expecting { after a on line 19, and expected ; before...
[5 replies] Last: You can't have a condition after the else statement. Line 23 should ju... (by Zhuge)
undefined reference compiler error with cstring
 
I get this error and I have no idea why, this entire program uses cstrings, but when I create char word in this function it decides it hates me. /tmp/ccCW...
[2 replies] Last: Thanks, I never woulda figured that one out. (by Smooth23)
Death before execution
 
I am trying to write a pokemon game but I can't do anything right now with it. Every time I try to execute my program it stops and tells me that the program ha...
[4 replies] Last: I'm an idiot. I remembered that if you declared 5 in an array it woul... (by GRex2595)
square of odd #'s
 
ok, i have to output sum of the square of odd #'s between a num1 and num 2. I have no idea where to start ='[
[3 replies] Last: #include <iostream> int main() { int n1, n2; std::cin >> num1 >> nu... (by kev82)
by kw1991
how does the plot function work?
 
i need to plot a graph using the plot function in a console application which i have never used before. Could someone maybe put up sample code so i know how th...
[17 replies] Last: @kw1991 You'll have to adjust this to suit your program, but I don't ... (by whitenite1)
DEADLINE AT 12 PLEASE HELP
 
Basically can't get my program to compile. Its saying that my member functions are not members of my class. I have no idea why... Here is the class definitio...
[5 replies] Last: assert lives in <cassert> (by Moschops)
Another Hello World!
 
Hi, Thanks to your forum and information you offer! I used to program in VB6 years ago. After that for several years I completely am far from Programming. Pr...
[5 replies] Last: Such a warm Welcome :) Thank you guys! Thanks....Really and I hope I'l... (by commodore)
return value (1,2)
 
Halo, Can someone please tell me how to return two values at the same time on the a function call. void conversion(int feet, int inches) { using name...
[20 replies] Last: If your compiler supports TR1, another possibility is tr1::tuple tr1:... (by andywestken)
Reading the next line of an input file...
 
This is a homework problem, but I've exhausted all my other resources and I'm turning to you for help!! I've been given an input file with a series of simple...
[no replies]
Switch not working
 
So this is a part of my code. When I press '1' it should enter the case 1: in the switch, but it doesnt.. I can press 2 and 3. How come, what's going wrong? ...
[2 replies] Last: Cheers, also saw that I had 2 of cin >> choice, that's why I thought t... (by Andre Ekblom)
by erikn
verifying valid command using char* array
 
i'm a total beginner playing around, trying to make a Zork-like rpg loosely based on the woodsy area where i live. here's the function i wrote to check user...
[6 replies] Last: This thread, I think: http://cplusplus.com/forum/general/54272/ (by Moschops)
output numbers and squares
 
sorry for being such a nuisance, but now I have numbers and their squares between 1 & 10. can anyone help, i have- #include <iostream> using namespace std;...
[4 replies] Last: Actually, the error is at the line before that. (by closed account D80DSL3A)
November 2011 Pages: 1... 4849505152... 65
  Archived months: [oct2011] [dec2011]

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