Hezekiah's Profile User Rating: -----

Reputation: 207 Stalwart
Group:
Contributors
Active Posts:
552 (0.29 per day)
Joined:
12-July 09
Profile Views:
9,377
Last Active:
User is offline Sep 14 2014 10:14 AM
Currently:
Offline

Previous Fields

Country:
ZA
OS Preference:
Linux
Favorite Browser:
Chrome
Favorite Processor:
Who Cares
Favorite Gaming Platform:
PC
Your Car:
Who Cares
Dream Kudos:
50

Latest Visitors

Icon   Hezekiah has not set their status

Posts I've Made

  1. In Topic: Make a text combat game in C++

    Posted 14 Sep 2014

    Are all the files in the same folder? Since the errors seem to originate from monster.cpp and monster.h, maybe you should post the contents of those files.
  2. In Topic: Make a text combat game in C++

    Posted 14 Sep 2014

    I don't have the file any more. From my quick look at the code you should make the following changes: add the line #include <string> after #include <iostream> in Monster.h and Character.h and change Combat(Character& C); to Combat(Monster& M); in Combat.h. There might be more errors, but just post them here and I'll tell you what to do.
  3. In Topic: Problem while reading an information from a file as a binary format.

    Posted 20 Apr 2013

    Quote

    I got a problem during binary file handling.

    Quote

    Here is the sample text file information

    So is it a text file or a binary file?

    Are you sure all the read operations are successful? Add some more ins.good() checks to your loop.
  4. In Topic: ivars VS. properties for ipad development

    Posted 17 Apr 2013

    Quote

    And finally, are there any good reasons to declare a function in the .h file if you won't be using the function in any other class other than in itself?

    No, that isn't neccessary. I usually only declare the functions and methods that need to be accessable to other files in the .h file. The main use of a .h file is, after all, to provide an interface that can be included into multiple source files.
  5. In Topic: ivars VS. properties for ipad development

    Posted 17 Apr 2013

    An ivar is similar to a local variable in a function or method, except that it is local to the class. A property creates methods to read and write an ivar, an usually creates the ivar itself.
    [code[@interface MyClass : NSObject
    @property(nonatomic) NSString* myProperty;
    @end

    @implementation MyClass {
    NSString* myIvar;
    }
    @end[/code]
    This code will produce something very similar to the following:
    @interface MyClass : NSObject
    - (NSString*) myProperty;
    - (void) setMyProperty: (NSString*) value;
    @end
    
    @implementation MyClass {
        NSString* myIvar;
        NSString* _myProperty;
    }
    - (NSString*) myProperty {
        return _myProperty;
    }
    - (void) setMyProperty: (NSString*) value {
        _myProperty = value;
    }
    @end
    

    The property will use more space and take longer to access, but this is such a small difference that you shouldn't have to worry about it. My personal preference is to use an ivar if it will only be used internally by the class, or it property if it has to be used outside the class.

My Information

Member Title:
D.I.C Addict
Age:
17 years old
Birthday:
January 31, 1997
Gender:
Location:
Pretoria, South Africa
Full Name:
Ulrik de Muelenaere
Years Programming:
4
Programming Languages:
C/C++, Objective-C, Python, PHP, JavaScript

Contact Information

E-mail:
Click here to e-mail me

Friends

Comments

Hezekiah has no profile comments yet. Why not say hello?