Beginners - April 2011 (Page 38)

Class constructor within another class constructor
 
I am trying to declare a class constructor within another. For example, in my .cpp file (main() function), I want to call Myclass(Myotherclass(1,2),3,4); Simil...
[1 reply] : "I am trying to declare a class constructor within another" within ano... (by sasanet)
Loop within function doesn't seem to matter?
 
Hi! I'm creating a program which has a section that the user is prompted to input a number. The number has to be from 1-10 or the program loops an error message...
[2 replies] Last: I don't understand how I would achieve this, unfortunately. Would I t... (by neowoot)
Namespace and Hidden This ponter?
 
Hi there! I am very new at c++ programming and i must admit that i never take up with any kind of programming language, that means that i am a completely noo...
[5 replies] Last: Hi CplusplusNoob1, in your example, I think you are right that the an... (by dangrr888)
Help with template
 
hello, thanks for reading. I'm solving an example from my book and I stuck :/ damn compiler says function does not match the argument list ^^ #include <iostrea...
[6 replies] Last: OK NOW WHAT'S WRONG IN THIS CODE? int main () { super* test = new s... (by sasanet)
Please Help Need your help
 
Hey guys there is a problem in my program...I have divided my program into three files firstly named main.cpp and it gets the input from the user and second fil...
[3 replies] Last: Hi behzadkh, yes, basically write struct YourStruct; in ass2.h an... (by dangrr888)
Reading a 2nd line of a file
 
Hey! Im trying to figure out how to read from a file, but not JUST the first line. I already know how to read from the first line: getline(txtfile, target...
[1 reply] : If you repeat the input operation, you can reach other lines. Try whi... (by hamsterman)
by Rave
Making a folder
 
I have ran into a problem with regarding I/O The problem is that the user specifies a relative directory path, and i have to create a folder, then save all the...
[4 replies] Last: Sorry, I somehow assumed windows. (by hamsterman)
Can't get what I want..
 
Hello everybody! This is my first post here, and maybe it is the most stupid you've ever seen. This is the problem: #include <stdlib.h> #include <stdio.h>...
[11 replies] Last: I don't really want to mix them. So, cin >> for input and cout << for ... (by leotato008)
Simple class question!!
 
I'm just starting out, and have attempted an extremely simple example of creating a class, with constructor, destructor, and a member function to calculate the ...
[2 replies] Last: Excellent advice, thanks. (by jazpearson)
by hondac
program design help
 
I have a huge list of words and I need to find all the words that can be reduced to a one letter word by removing one letter at a time. //e.g. Assume all these...
[1 reply] : limits? (how many words?, how many letters per word?) I don't know abo... (by ne555)
Polygon Defining
 
Hey guys,i was working on a project which is a homework, i admit , however i wrote some codes and i could not find the error in them so i'd like one of you guys...
[1 reply] : [co de] "Please use code tags" [/co de] [quote=Linux Programmer Ma... (by ne555)
by ascii
data type in function parameters
 
ive seen code where when someone creates a function the parameters give two data types but no identifiers for the parameters like this: int randomFunction(i...
[3 replies] Last: where identifers must! be included otherwise wont work I'm afraid t... (by Branflakes91093)
ctrl - z question
 
I want to express something in C++ but I'm unsure... basically if I enter a number less than 1 or enter ctrl-z, then my program will display a cout message... h...
[5 replies] Last: I'm still having issues with it, even using your method... I have now.... (by bluesoleli)
Adding issue
 
I'm having a problem with a program which adds a highest number and a 2nd highest number... I have this code so far... The Cin statements go here... Largest...
[3 replies] Last: Ok, I got it through another way, through the use of: if (num1>=num3 ... (by bluesoleli)
C++ Classes
 
Hey Everybody First off just joined this forum and it looks promising! But let's get to the point of this trivial question: For a while now I have been re...
[3 replies] Last: Just a quick question about classes again, I have started my c++/SFML ... (by Father Sloth)
Noob help needed! (1,2)
 
Hi guys, I've started c++ at school and am having very difficulty finding soloutions to answers and writing code. I'm even attending after class lessons but sti...
[23 replies] Last: i would try but i dont know how to do it, any suggestions (by hakkenadlay)
Dynamic Memory Allocation: Array Initialization
 
Hi guys, So I'm trying to learn how to use dynamic memory allocation with arrays. In this project, I am trying to read a list of numbers from a file into a...
[3 replies] Last: dArray = new (nothrow) float () ; how did u do this if "size" is un... (by sasanet)
by IGITI
I need help with how objects interact.
 
So I'm pretty new to C++ and I'd love some help with this concept. I'm trying to create a small program. I have two classes: a Player_Character and Item. The Pl...
[3 replies] Last: class Item; //you need to make Player_Character aware of Item's e... (by Mathhead200)
salestax program
 
I'm currently making a salestax program for my overseas trip... it's for fun, but basically i want to be able to buy an item, say for $5, enter it into the prog...
[3 replies] Last: oh lol, silly me, exit is just: if (num1 < 0) return 0; LOL! Well,... (by bluesoleli)
by cmh
I don't know what I'm doing wrong...
 
I have an assignment in which I basically just have to take an old program, and rewrite it using functions, but it's proving to be rather difficult for whatever...
[3 replies] Last: // Calculate retire age cout << "Please enter an age: "; cin >> age;... (by TheNoobie)
April 2011 Pages: 1... 3637383940... 55
  Archived months: [mar2011] [may2011]

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