Beginners - December 2013 (Page 66)

Object creation with constructor parameters
 
Hello. I have some code like this: Scanner myObject = new Scanner(System.in); How this works? How do I do it in C++ with classes? Thanks!
[2 replies] Last: Hello! Thanks for the reply! I'm not a newbie... I've learn that. But ... (by iQChange)
by Ratham
Accessing Class Through Template
 
Hey all, it's my first time working with templates and I'm running in to some weird stuff. On top of that, I think my compiler is screwing with me because it's ...
[4 replies] Last: [quote=Ratham]Would probably help if the constructor for Task was set ... (by norm b)
Extracting data from txt file
 
I am currently working on a C++ project that will calculate the passer rating for NFL QBs. The code is required to extract data from a txt file that is organize...
[3 replies] Last: Erm, I am a very new beginner, so I would appreciate elaboration, as i... (by bwilfong3)
by azura
Combination of while and do-while
 
I need HELP!! I can't figure out what's the prob with this code. Can someone help me. *** This is the output Enter 1st Number: 3 Enter 2nd number: 7 34...
[16 replies] Last: @RabMac, I get it now. Thanks.. (by azura)
delete
 
delete
[no replies]
Entering A Decimal
 
I'm writing a code that requires the user to enter a decimal as an int value, but when I have gone through to test it, the program freaks out and goes ballistic...
[2 replies] Last: I figured it was something simple like that, much appreciated! (by kolo7880)
Error on CIN
 
I'm getting an error on the operator sign of cin >> The error says while trying to match the argument list. What is wrong here in my code that is prompting tha...
[4 replies] Last: Nevermind doublemain, I just fixed it! Thank you for your response tho... (by fahmankhan75)
Help with a loop(which kind?)
 
I have a main which asks the user for hours, minutes, and seconds. As long as the hour is not -99, It is supposed to go through the main, and repeat by asking f...
[3 replies] Last: Nevermind I figured it out. its a while loop like that then an if else... (by jkelly18)
by hilft
Float + int = ??
 
Where can I find informations regarding addition/subtraction/multiplcation/division of float/int/double numbers? According to the code below, I ended up getting...
[2 replies] Last: for clarity it's often a good idea to explicitly cast. In visual stu... (by Stewbond)
Saving text file in an array
 
Hello, I'm trying to save a text file to an array, and then displaying the text file when the program is run. There are 9988 characters in the file so I can...
[2 replies] Last: Thanks very much for the link, i'll go through it and see if i can get... (by Michael 11)
text color change
 
I am trying to have the "X" printed red and the "O" printed green but it is all green, before it all changes to red. for(int i=0; i<64; i++) { ...
[5 replies] Last: http://www.cplusplus.com/forum/general/48596/#msg264748 (by Duthomhas)
if statements
 
Hello everyone, I remember that there is a way use a '?' in an if statement, but I remember the syntax, could you help me? I tried something like: if(a ...
[1 reply] : The ? operator has three parts: condition ? true-value : false-v... (by Duthomhas)
unclear "comand"
 
Hi, can someone tell me what "for(;j;j--)" exactly do in this given "program"? i used it in class but it's still unclear to me :/ #include<iostream> u...
[3 replies] Last: Too late. Validation for spam behavior. http://www.cplusplus.com/forum... (by Duthomhas)
receiving an image/ structure with c++
 
Hi, I am struggeling with this: i have this "image/structure" given: 0 00 000 0000 00000 000000 0000000 000000 00000 0000 000 00 0 and i need...
[3 replies] Last: Patience, young paduwan. http://www.cplusplus.com/doc/tutorial/contr... (by Duthomhas)
Repeated Averages Being Displayed
 
I'm writing a program which calculates the average of several students' test grades. Whenever I run it only the last students' average is displayed. For exam...
[4 replies] Last: That fixed it. Thanks, cire! (by castellanspandrell)
How to read specific numbers from .txt
 
Basically I am trying to do calculations with numbers from a txt file. 4 32 8 38 6 38 6 16 7 However I dont know how to select a number specifically and...
[1 reply] : When you have read the file, have you stored each separate number from... (by Mats)
How do I know what code an address points to?? Debugger isn't very helpful
 
My program keeps crashing on some function, and so I ran the debugger and it gave me an address. But, I don't know where the address belongs in the actual codin...
[16 replies] Last: Sure, I'll look at it. (Why not? :) ) (by long double main)
Dynamic array inside a structure
 
Another 11th hour challenge from my homework. I know exactly what I need to do, just not how to do it. The assignment involves making a structure of student ...
[no replies]
Inheritance Help!!!!!!!!!!!
 
When I compile, i get an error stating that I need a return value for my GetArea() function inside of "shape.cpp" but I set my return values in my derived class...
[3 replies] Last: It compiles perfectly now. Thank you! (by Raspb3rry14)
Pointer Problems
 
My test runs but I don't think I am using my pointers right but after days of trying to figure it out I need new eyes to see where I am going wrong. I have a ra...
[no replies]
December 2013 Pages: 1... 646566676869
  Archived months: [nov2013] [jan2014]

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