|
| ||||||||||
| Tags: c programming, class, objects, programming |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| ||||
| ||||
| Accessing Objects Outside Of Class
|
|
#2
| |||
| |||
| Re: Accessing Objects Outside Of Class
Hello, Same problem here also. I have a game play has done in C + + and for now I have a little trouble. I have classes with a class team, teammate and all. In the class 'team' I declare an object tray and PL class teammate I want to access object attributes PL I said in class team so I made a PL.getValeur (getValeur is a method of Class shelf) but it is not working it says 'error C2065:' PL ': undeclared identifier'. Can anyone help me? |
|
#3
| ||||
| ||||
| Re: Accessing Objects Outside Of Class
if you want to access a class member in c++ then you must need to make use of the code below: Code: Object_name.Functionname (arguments); Code: class Test
{
int num1, num2;
public:
void sum(int,int);
} emp; |
|
#4
| ||||
| ||||
| Re: Accessing Objects Outside Of Class
Following are the tips for choosing an Access Level: If other programmers use your class, you want to ensure that errors from misuse cannot happen. Access levels can help you do this.
|
|
#5
| ||||
| ||||
| Re: Accessing Objects Outside Of Class
Hello, I think you must need to use the books on C++ as below:
|
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Accessing Objects Outside Of Class" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Upgrade Sony Ericsson Xperia Play Micro SD card from class 2 8GB to class 4 32GB | Aaryan2011 | Portable Devices | 8 | 08-10-2011 11:06 PM |
| How Objects of class are created in C++? | Alibamu | Software Development | 4 | 29-12-2010 05:24 AM |
| Instantiate different objects of same class | ISAIAH | Software Development | 5 | 09-03-2010 09:05 AM |
| How to sort vector objects by class member variables in c++? | Linoo | Software Development | 4 | 29-01-2010 06:15 PM |
| Good news for CBSE CLASS X & CLASS IX - visit learnnext | surya_expert | Education Career and Job Discussions | 0 | 13-12-2008 11:09 AM |