class question?

Started by
6 comments, last by Sleipnir 21 years ago
if i create a class in a header like class.h class class() { something here } and i want to use the things that are insede, lets say a int, in a cpp file lets say main do what should i do, only include the .h file or other thing? ---------------------------------------------- "Nearly all men can stand adversity, but if you want to test a man´s character give him power" -Abraham Lincoln
---------------------------------------------- "Nearly all men can stand adversity, but if you want to test a man´s character give him power"-Abraham Lincolnsleipnir a.k.a odin1985Leader of Crystal Atatrium @ http://atatrium.bluewolf72.com
Advertisement
Include the .h file in your cpp file, and put a semicolon at the end of you''re class declaration.

-~-The Cow of Darkness-~-
-~-The Cow of Darkness-~-
how do i call a class, without making the user press anything?

----------------------------------------------
"Nearly all men can stand adversity, but if you want to test a man´s character give him power"
-Abraham Lincoln
---------------------------------------------- "Nearly all men can stand adversity, but if you want to test a man´s character give him power"-Abraham Lincolnsleipnir a.k.a odin1985Leader of Crystal Atatrium @ http://atatrium.bluewolf72.com
You can't call a class. And user input doesn't have anything to do with classes.

[edited by - micepick on March 30, 2003 7:22:31 PM]
uhh... what are you talking about?
class is in recess
quote:Original post by Sleipnir
if i create a class in a header like

class.h

class class()
{
something here
}

and i want to use the things that are insede, lets say a int,

in a cpp file lets say main

do what should i do, only include the .h file or other thing?

----------------------------------------------
"Nearly all men can stand adversity, but if you want to test a man´s character give him power"
-Abraham Lincoln



Stick to procedural programming for now. Doesn''t look like you''re ready for classes
Rudeness is never appreciated, but I must add my voice to the crowd here: It seems fairly clear that you don''t yet understand what classes are, or what they are about (either that, or you completely fail to communicate your problem ). I suggest you return to your favourite book (or tutorial) and read up on the basic concepts.

This topic is closed to new replies.

Advertisement