Beginners - April 2013 (Page 67)

My HS senior project test 1
 
hey all, i have this simple test program that is going to be the basis of my senior project for high school. I need some help. I wish to make a simple program t...
[5 replies] Last: #include <string> (by fg109)
Problem with files
 
Hi people, i was trying this program while understanding the basics of input/output a txt file. SO this is a program while asks the user to input the name of...
[no replies]
random number
 
i want to make a program in which i have to display an array of random number from 1 to 10 .and the number should be shuffled but each number can occur only onc...
[8 replies] Last: One approach is to fill the array with the sequence of numbers 1,2,3 .... (by Chervil)
homework troubles
 
So I have been working on this mess for hours and I have no clue what I am doing wrong. I am trying to open this text file(the text file is there), but it just ...
[3 replies] Last: Give this a try just to see what happens. #include<iostream> #include... (by Yanson)
turning a number
 
How do I turn a number. I mean something like this: 1234 -> 4321 Can someone tell me how?
[6 replies] Last: http://www.cplusplus.com/forum/beginner/62495/ (by Sam99)
by zukias
Simple inheritance question.
 
#include <iostream> using namespace std; class BaseClass{ public: BaseClass():nValue(0){} void inc(){ nValue++; } void print(){ ...
[3 replies] Last: Oh dam of course! Thanks. :p (by zukias)
Loop if its not an int
 
I want c++ to loop this if its not a number, giving the user a chance to correct the errors. I also tried using failbit flag in an if statement to give an error...
[4 replies] Last: Line !num < 0 will be treated as (!num) < 0 . !num will be either... (by MiiNiPaa)
Trouble with card game functions
 
I am currently writing a go fish program and am having some trouble manipulating my functions. For general context, here are my current functions: void sh...
[no replies]
by Rascal
Classes
 
Hi, I am working on the question below. Consider the following class declaration: class Employee { public: Employee (); string getName(); private...
[1 reply] : " Employee::employeeNumber " is private. In general, private data-memb... (by closed account zb0S216C)
Having trouble with a code from Accelerated C++
 
So I ordered a few books to start learning C++ and so far so good except for one thing. The example code that is in Ch 3 of Accelerated C++ doesn't seem to work...
[4 replies] Last: Ah alright. I WAS entering the data in wrong. Thx vlad and everyone el... (by TripCode)
making a hollow square
 
I need to know how to make a hollow box with spaces in between so the code outputs like this for an inputted character. The solid box is fine, I'm just not sure...
[4 replies] Last: @applesnstuff (4)> #include <iostream> #include <iomanip> #include <s... (by Sam99)
by JrT
Use of fstream, arrays, and strings
 
#include <iostream> #include <cmath> #include <string> #include <fstream> using namespace std; int main() { const int size = 30; // valu...
[no replies]
How can i store 3 different values in a single datatype?
 
For a final C++ project that i am working on right now for college, we need to create a program that will read in a folder on your computer, and then will list ...
[1 reply] : Create a struct or a class with two integer data members, or you can u... (by Peter87)
by Trowen
Constants
 
If I were to declare a constant variable but not initialize it, could I do so on another line?
[1 reply] : Yes, just like any other variable. However it is best practice to do d... (by Mobius1)
Error C3767 candidate functions not accesible
 
i'm getting this error (candidate functions not accesible) when trying to use get/set methods from file Allformvariables.h in MyForm.h I'm putting variables...
[6 replies] Last: i thought that because the functions Setfloat and Setchar were public ... (by welsh4evr)
by Rascal
Accessors
 
Hi, Still very new to C++. I am looking at the code below. If the accessor getName() is specified before private is it automatically public? Thanks cl...
[2 replies] Last: Thanks so much for the explanation and coming back to me so quickly. A... (by Rascal)
by enemy
web photos
 
...
[2 replies] Last: Hello! I wrote twice to Lounge but it does not accept! What should I d... (by enemy)
by fagyi
data verification
 
Hello, im working on my homework and i have a problem when it comes to data verification. do { cout<<"Feljegyeztuk, hogy egymas koveto het...
[3 replies] Last: If an integer is better for the job, why are you trying to feed it a f... (by cire)
Debugging via console compilation
 
Hi all, It may not be the best practice, but I've found that I really dislike using an IDE as they are so heavy and take up so much screen real-estate, when th...
[1 reply] : Have you looked at gdb? Aceix. (by Aceix)
Reading line by line from Binary file
 
Hi, first post here. I am having issue with assigning a binary file line by line to objects of a class I made. Essentially its a class of SOng that has Song, ar...
[2 replies] Last: And pls state any errors the compiler/linker is giving you. Aceix. (by Aceix)
April 2013 Pages: 1... 6566676869... 83
  Archived months: [mar2013] [may2013]

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