Beginners - December 2011

Calculator code issue
 
I have recently written code for a calculator. I've used functions to define how to do the operations. The user selects the operation using a character. That ch...
[5 replies] Last: That is great I am happy for you :). (by Stormhawk)
by kapo
GCF algorithm error
 
/*Revise the program so that it prints out all the steps involved in the algorithm. Here is a sample output: GCF (500, 300) => GCF (300, 200) => GCF (100, ...
[3 replies] Last: yea i changed it to return Gcf(b, a%b); and it worked. thx guys... (by kapo)
Linking Two Programs
 
I'm back again haha(: I'm fairly new to c++ and I don't know how to link 2 c++ files together. What I have is a c++ file that is a basic password checker and a...
[3 replies] Last: It means you've screwed up the start of the function. Let's see the co... (by Moschops)
Multipling multipal decimals
 
Help needed. I'm writing a simple code that computes metric and imperial measurements, however when I try this multiplication "output =(input*0.001)*0.001" it ...
[2 replies] Last: I'll try that one also, but I found a solution. Here is a piece of the... (by leechmonger)
by Jimbot
Class inheritance guidance
 
Hello, I have been working on a blackjack game and have tried to make use of the inheritance feature of classes in my design, but I am not sure whether I hav...
[3 replies] Last: Thanks for the replies. Yes I did wonder about having another class ... (by Jimbot)
ifstream not working
 
Hey folks, ... in my first week of C++ programming, I'm using ubuntu and eclipse ide. I can't get ifstream to read a simple text file. goo.txt is just a garba...
[3 replies] Last: What does it say about this code? Which compiler (not IDE) are you us... (by Moschops)
two similar bits of code using stringstream; only one works
 
I'm trying to write a program which opens a text file with a name of the form "file0.txt" or "file20.txt" or anything like that. I mucked about with a few metho...
[2 replies] Last: That works perfectly. Thanks! (by Kwiftee)
questions of a game's code.
 
There's three erro in my code which i don't understand after i search for these error: error C2679;error C2679;error C2064; #include<iostream> #include<ct...
[8 replies] Last: end=lost =true; is valid C/C++ syntax But I would code it as you su... (by andywestken)
Application crash
 
I'm working on a morse code translator and whenever the letter b is entered the application crashes. More specifically if I I take out the last character from t...
[6 replies] Last: Since you thought that your string is adapted to the new entered chara... (by eypros)
string arrays cmd issue
 
Hello there my fellow programmers.Since I fell in love with this forum and the users,I came to ask yet another question,if you can spare 5 minutes to look at it...
[no replies]
Computer's guess my number C++
 
Hello forum.I am truly sorry this is my first post,but as I am a terrible programmer who has just begun(or might I say,just 'properly' started) C++.I am have a ...
[15 replies] Last: bah,heck it,I'm just going to resolve this.Thank you guys for your hel... (by MinwooJu)
What is the error in it???
 
#include<iostream.h> #include<conio.h> #include<stdio.h> void main() { int col,row,rno,m1,m2,m3,m4,m5,s1,s2,s3,s4,s5,total,w; char name,c; float per; cl...
[1 reply] : Please read: http://www.cplusplus.com/forum/beginner/1/ (by eypros)
by seth23
Random number from a set of numbers
 
Hi, I am trying to develop a random number generator that will generate a series of numbers between 1000 and 9999. I can't figure out what I have to do. Can s...
[3 replies] Last: I haven't looked too much into it, but I can give you a quick explanat... (by Hippogriff)
still cannot compile...why??please help me on this...
 
#include<iostream> #include<cmath> #include<iomanip> using namespace std; void GetPlayersNames(char ,char ); void ShowPlayersNames(char ,char ); void ...
[1 reply] : You didn't need to make a post on the beginner subforum and the Genera... (by Hippogriff)
by joel s
To find the largest number using function that returns value
 
Error that extra parameter in call to large(int)
[3 replies] Last: it means you have more actual parameters than formal parameters (by Waqar Ahmed)
by hello
How to use void fuctions
 
I need help/aid on my c++ program/file. I am a beginner and I am using the code that I saw on youtube, but a bit different. The compiler does not detect any err...
[4 replies] Last: Looks good. Now try adding some loops to it. ; ) (by IceThatJaw)
trying to loop or call the main function to run again
 
#include <cstdlib> #include <iostream> #include <ctime> using namespace std; int mainagain(); int main() { //unsigned seed = time (0); //commented...
[7 replies] Last: Thanks, I was a bit lost and jumbled up my code. Your coding looks muc... (by nickoolsayz)
by Ch1156
How to make my code stop writing over a current text file
 
Ok so i have some code that outputs stuff to the screen but everytime i open the program it overwrites the current text file erasing everything that was saved i...
[4 replies] Last: Ok i found it, maybe it was a little different than i thought but here... (by Ch1156)
Runtime Error Message
 
I am having a runtime error message whenever the application reaches the function "riggedfight" and i am having no luck figuring out why. Any ideas what the pro...
[2 replies] Last: Awesome! It worked, thanks! (by Nathan McCleskey)
how to pass command line parameters to functions
 
#include <iostream> #include <stdlib.h> using namespace std; class empsalary { int salary; public: void display(int r) { salary=5000; salary...
[4 replies] Last: Also, you're missing a ");" after argv . I'm sure the compiler is giv... (by srinivas01)
December 2011 Pages: 123... 47
  Archived months: [nov2011] [jan2012]

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