Beginners - July 2014 (Page 26)

A parameter declared inside main is not same as parameter declared in another function.. Why?
 
I notice a variation in this two results: int sub(int x=2, int y=1) {int z; z=x-y; return z;} int main (int a=2, int b=1) {int result; result=a-b;...
[9 replies] Last: Keskiverto.. Ur reference helped me undrstand ganado's comment.. Thanx... (by Javaspell)
by marcoE
Constructors with conditionals
 
Hello guys, I'm learning C++ step by step. github: https://github.com/CreativeSoftware/DiamondQt This is my classDiagram: https://dl.dropboxusercontent.com/u/...
[no replies]
scramble number
 
please help me, what is the formula or code to scramble a given number for example the user will input 30198 and the output will be 13089 and it will be subtra...
[1 reply] : http://www.cplusplus.com/reference/algorithm/random_shuffle/ (by Yay295)
My Function No Responding When Run
 
This is my subfunction and I have no idea where is my codes wrong~~ Please help solve~~ Thank You Very Much~~ int add() { int x; //types of addt...
[10 replies] Last: Oh I See ~~~ Thanks ya @chervil ^.^~~ (by quisite)
nan
 
im making a full calculator but why is the output is always followed by nan ex: 9+9=18nan
[11 replies] Last: @Chervil yeah it was some other code. by the way thank you (by xenovia12)
Book for c++ beginner?
 
Hi! I was wondering if anybody had any advise for a c++ beginner (never programmed before except for some actionscript). I'm currently using "Addison Wesley ...
[2 replies] Last: any c++ book will do you good. or you can check this out. http://stack... (by xenovia12)
Trying to have my Calculator go on infinite loop
 
The line with For ( It says that h doesn't name a type. #include <iostream> #include <cstdlib> using namespace std; int main (); int x; int y; i...
[2 replies] Last: line 159 should have change into this while( o >= 0) if you are doin... (by xenovia12)
by Nell34
Basic questions from a newbie...
 
Hi all, I'm an absolute beginner in using C++. I have some knowledge in programming in Java, but none with C++. Now I have to understand a C++ source code an...
[4 replies] Last: They are similar, C++ compilers translate references to pointers behin... (by Ganado)
order of declaration and definition
 
Hi,guys, I've encountered a problem regarding the order of declaration and definition and I hope that you guys can help me out. Basically, I was trying to write...
[2 replies] Last: Get it, thanks a lot! (by glenjoker)
WINAPI Buttons and Shapes
 
Why doesn't this work? i am trying to make the button make the circle red. #include <windows.h> #include "main.h" LRESULT CALLBACK WndProc(HWND, UINT...
[9 replies] Last: Thanks, just for anyone witha similar problem, = is the assignment op... (by coder777)
Simple while loop
 
Basically, everything works until the user types anything that ISNT a number. When if you type 1, it excutes 1. when you type two, it excutes 2. when you type 3...
[7 replies] Last: the exact same thing.. menus in cmd. that's why i posted here. i was ... (by kong288)
pointers help
 
Having a problem getting these pointers to work. Not sure what im doing wrong, any help is appreciated. The code keeps creating a head in the linklist inste...
[2 replies] Last: Sorry about that, thanks for the help, its always the simple things. ... (by elite zero)
Rock Paper Scissors Lizard Spock
 
I have most of this figured out but I am coming across one problem. When the user either wins or loses on the first try the game functions as its supposed to...
[5 replies] Last: Are you on the same class as: http://www.cplusplus.com/forum/beginner/... (by keskiverto)
this is compiling but giving an error not dislaying the sum
 
A function Count is passed a double array along with two other parameters val and dval, val indicates the number of elements in the aarray and dval is a user ...
[1 reply] : I don't know how you got it to compile. line 7 is not valid. Array siz... (by Yay295)
Rock, Paper, Scissors, Lizard, Spock issues
 
Hello, I have to write the rock, paper, scissors, lizard, spock game. I'm having an issue on where to from where I currently am. The program must be divided i...
[2 replies] Last: I wouldn't write the program like this but I have to for my class. The... (by kdillon56)
Postal Barcode Lab Issues
 
Hi!! so for my CS lab were supposed to encode a 5 digit zip code into bars (using : and |'s) then we have to have a check digit where were supposed to add up ...
[2 replies] Last: Your check digit function is over complicated for checking valid zip ... (by Smac89)
How to match array?
 
I have a question here. How do I match/overlap the array location of subfunction with/to main function? For Example, (subfunction) menu to (main) ...
[3 replies] Last: (subfunction) menu = 3 (subfunction) return menu -> (main) men... (by quisite)
by Ganado
Comments and effectively using getline(f, line) with >> operator
 
I am trying to make a config file that has the capability of detecting that a line in it is a comment if it has a '#' in it. Here's the working code I have r...
[6 replies] Last: I got it to account for white space by doing bool onlyContainsSpaces... (by Ganado)
function won't print my array?
 
Hi guys, I am new to c++ but I have an issue with my program. basically I have a blackjack program (that I think everyone starts with?) and I am trying to te...
[4 replies] Last: That did it! thanks so much for your help!! (by iandalton9690)
2d Array Reverse Crash
 
Write your question here. Hello my program takes an input turns it into a 2d array then reverses it. When I try to output my array it outputs 3 negative number...
[9 replies] Last: Oh, Thanks. (by neel3123)
July 2014 Pages: 1... 2425262728... 43
  Archived months: [jun2014] [aug2014]

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