Beginners - August 2012 (Page 3)

by ToniAz
The Practice of Declaring Custom Classes as Pointers
 
Hello everyone! I don't know if I asked my question correctly, but this is what I'm after: class fluffy { public: std::string name; }; class rabbit :...
[6 replies] Last: Polymorphism doesn't require the use of pointers: it works with refere... (by Cubbi)
difference between float and double
 
main() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); } what is the output of the above program and p...
[2 replies] Last: i compiled this code and got the answer as "i hate you". Thank you fo... (by sdinesh1991)
Roman Numerals
 
I am attempting to create a program that will convert roman numerals to decimals and decimals to roman numerals. I have a code that works for the most part but,...
[7 replies] Last: @andywestken I didn't know this XC was valid, I only knew about IV IX... (by Maniax)
by Arik V
dafault constructor
 
hi evryone! I get the this error: error C2512: 'Temp_client' : no appropriate default constructor available what i should do to solve the problem? thanks.....
[2 replies] Last: 'Temp_client' does not have a default constructor so u have to initial... (by soranz)
by mahone
How do I create header files?
 
Need some help with creating header files and linking them.. I have been trying this simple example: Simple.h: #ifndef Simple_h #define Simple_h con...
[8 replies] Last: First of all, Thank you Everyone for sharing this useful info. I kn... (by mahone)
Hey jus a small prob with percentages
 
doing some work for tafe here and got everything working for a dice simulator that needs to simulate 10000 throws of 2 dice and calculating how many times each ...
[6 replies] Last: #include<stdlib.h> #include<stdio.h> void main() { float Per... (by Whyt123)
String Array output to a txt file problem.
 
Hello I want to write an Array in a TXT File, but it don´t work. My program just write a hexcode into the txt file. So how I can solve this problem. Here is ...
[1 reply] : You declare an array of strings, which decays to a pointer to the firs... (by BlackSheep)
weird error with 4-way binary tree
 
I am just getting a weird list of errors and any help at all would be greatly appreciated. HERE: 1>------ Build started: Project: chunksaveing, Configurati...
[10 replies] Last: I've never come across any warning like that, and I've used each of th... (by helios)
VS2010 template project?
 
Making those links to SFML are really annoying and I was wondering If I could make another project and link it to SFML and use that as a template project that I...
[4 replies] Last: but why is dynamically linking libraries dumb? It's personal opini... (by Disch)
college work
 
I just stared my c++ class tonight. My first assessment is to write a C++ program that declares a value that can hold the price of a lunch. Prompt a user to ent...
[6 replies] Last: thank you for your help it works know (by closed account 37S1hbRD)
Are there any problems with my program
 
I'm new to c++ and I wrote a program that computes the tax and the tip on a restaurant bill for 2 patrons. The tax was fixed at 6.75 percent of the mean charge....
[3 replies] Last: Your welcome. Im also beginner in C++. (by vichu8888)
by mjhay
problem
 
i don't know how to create a problem to make it a program.
[1 reply] : What? (by ascii)
end of file before left brace
 
Hi I'm new to c++ I have learned some and i've been working on a factorial program to give the factorial of a # 1-20. I have all my code worked out and everyth...
[4 replies] Last: The only way to do a factorial by if ... else is by exhaustion i.e. li... (by ToniAz)
Cannot return the index number in result
 
#include <iostream> #include<string> using namespace std; char * substr(const char *, const char *); void main() { char* input1=new char ; char*...
[6 replies] Last: okay thanks u @nwn , thanks ya (by Lim Boon Jye)
first step to windows visual program from command prompt
 
Hi! I want to take my first steps in making a lightweight graphical interface from commandline, from "type 1 for ... type 2 for... type 3 to quit" to buttons, ...
[3 replies] Last: Ok, now it's clearer what u'r after. Forget about WinBGIm. With a li... (by soranz)
Can the same object initialize a private variable via a constructor more than once
 
It'd be convenient to just update a private member variable whenever I wanted without having to declare a new object every time. Is this possible? Thanks for ...
[13 replies] Last: A constructor initializes a new object. You cannot call it on an exi... (by Athar)
by Sykner
Incredibly high memory problems
 
Hello, I have a program that, by the looks of task manager, gains 10,000 KB of memory a seconds non-stop until it hits about 2,000,000 KB and comes to a com...
[5 replies] Last: Thank you for your help soranz and romai. I found an if statement tha... (by Sykner)
Global Vars, Classes and Seperate Files
 
I've been learning C++ for a few weeks and over and over I've heard that global variables are bad, but as i try to learn classes and seperating things across fi...
[6 replies] Last: Thanks for the suggestions. I've found that if i attempt to use the a... (by Bugsplatter)
Factorial
 
I'm brand spanking new to C++ so any help/suggestions would be great: I'm suppose to be making a program that shows factorial for 1-5 using "for". I have: fo...
[9 replies] Last: Ah, I missed the comparison operator in my book. I got it to work that... (by bowlbase)
by ac698
C++ templates and recursion problem
 
A question about template recursion. I start an evening class in C++ OOP in October and thought I’d brush up on my limited programming skills. I chose to wri...
[no replies]
August 2012 Pages: 12345... 45
  Archived months: [jul2012] [sep2012]

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