Beginners - October 2012 (Page 39)

by G3PO
Summation Program.
 
I'm supposed to be making a program that can find the summation of a function (such as x^5+10) from x=1 to n, which is inputted by the user. I'm supposed to do...
[1 reply] : You just need to use a loop that runs from 1 to n (the user's input). ... (by freddy92)
histogram help
 
i am writing a histogram and i am almost done i just need help with the final format of the astericks: The longest bar always should contain 50 asterisks, a...
[6 replies] Last: oh ok i was trying to repalce a with 50/max for some reason thanks a... (by jayadelgado)
by G3PO
How to limit number of guesses on a program.
 
Hey, so I've created a random number game where you are supposed to guess the number. The only problem is I want the user to only have five guesses, but I can't...
[6 replies] Last: Oh okay that actually helped a lot. I switched it around and put the g... (by G3PO)
Static class object as class member
 
Hi, I am trying to create a static object of a class b as a member of a class c. But I keep getting errors. What I do is simply declare it private in class c l...
[2 replies] Last: Thank you very much. (by zanklob)
by pinko
switch statment
 
#include<iostream.h> main() { int num, r; r = num / 10; cout<< "enter number = "; cin>> num; cout<< "\n"; switch (n...
[4 replies] Last: Try to put your line: r = num / 10; AFTER cin>>num; You have it b... (by oldcrow)
Using Classes I have written ?!
 
Hey everyone (: so, coming from java, i am a little confused how i properly use classes that i have written. Here s the setup: i have written a class tokenizer ...
[2 replies] Last: The difference between #include <someFile> and #include "someFile" ... (by Moschops)
what can i do to learn c++ ?
 
please help me.
[6 replies] Last: You can learn C++ with a tutor as me for example.:) (by vlad from moscow)
LOOP!
 
Hello, Programming troubles. So here is the deal. In the program below I'm supposed to make some functions which I did and use my new found knowledge of functio...
[6 replies] Last: nevermind ...sorry got it again it was the left thing that was messin... (by jlillie89)
How can i save to disk with code? into .txt
 
It may be strange and hard..i hope someone can help me i want to save a data from my c++ i want the file save to disk into format .txt then reload the data ...
[2 replies] Last: @Chervil Thanks, but i found that we don't need to use const char i... (by Neo Takaredase)
by pinko
Decision statments
 
call charging program using logical, arithmetic operators and decision statements if, if else, nested if, nested if else,: if call start from 8:00am - 19:59pm...
[15 replies] Last: Moooce other charges are applying in if( startingHour >= 8 && start... (by pinko)
Program not working
 
I'm trying to make a program that records orders taken then displays how many of which order was taken and the total for the orders. The program has to include ...
[5 replies] Last: Did you ever figure out what was wrong because, I would like to know t... (by RememberToSmile)
List is mean structure or class
 
you are to implement a class named Course. A Course class should be able to keep the course code, course name, credits, the number of students enrolled, a lis...
[7 replies] Last: You can use the dot operator to access member of the struct. cons... (by TheIdeasMan)
problem with logic in for loop
 
#include<conio.h> #include<stdio.h> void main() { int i=0,j; for(i=2;i<=5;i++) { printf("\ni am starting"); for(j=i+3;j<i*3+2;j++); { pri...
[2 replies] Last: well you have given me the answer (problem is because of semicolon) th... (by shahzaib1111)
Variables declared in header, undefined according to declaration
 
I'm quite new to this and do not understand this fully yet, but I'm trying to create a class using variables. One of these variables is of a different class (C...
[3 replies] Last: Problem has been resolved, thanks though. (by Dr Acula)
by xzbit
try catch multiple exceptions
 
try { int a = b + c; int d = e + f; // and so on.... } catch(int a, int b)//wrong { } what is the better way to catch multiple exceptions?....
[2 replies] Last: Only one exception can be thrown at a time. try { // and so on.... ... (by Peter87)
help with board game program
 
i am stuck on how to make this program work. its a two player board game and certain spots means certain things (draw a card, spin the wheel, etc.). any help wo...
[3 replies] Last: while(end1 == 0) The variable end1 is not initialised. Same with en... (by TheIdeasMan)
by marcoP
vectors of vectors in functions
 
Hi there, I want to pass a matrix as an argument of a function, and instead of using multidimensional arrays or pointers to pointers my teacher told me to use ...
[3 replies] Last: I checked the real code of the program and I only made an error in cal... (by marcoP)
by shaggy
Moving distances
 
Hey again guys, i have encountered a problem which i am finding very difficult, but maybe its one of those problems where there is a really easy solution :) (so...
[no replies]
Delete directory with files and sub folders
 
Hi, I need to delete the directory with files and sub folders. If i use RemoveDirectory(), it will delete the empty directory only. Is any function availabl...
[3 replies] Last: The algorithm goes something like this: RemovePath( path ) if Fin... (by kbw)
How to get inheritance with argument?
 
Hi, So i'm trying to get a function called void MovieList::printTitle(string title) to be used in another class file, but when it comes to arguments it doesn...
[1 reply] : So you haven't declared or initialised title in usb.cpp. Do you reali... (by TheIdeasMan)
October 2012 Pages: 1... 3738394041... 84
  Archived months: [sep2012] [nov2012]

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