473,563 Members | 2,668 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Befriend during runtime?

Hi,

I'm currently writting an application and I was wondering if there was
a way to declare a class friend of another during runtime?

Thanks.
Philippe Gagnon

Dec 23 '05 #1
2 1267
he************* *@gmail.com wrote:
I'm currently writting an application and I was wondering if there was
a way to declare a class friend of another during runtime?


No, there isn't. Why do you want to? Perhaps there is another way of
accomplishing what you need to do.

Best regards,

Tom

Dec 23 '05 #2
On Thu, 22 Dec 2005 20:27:38 -0800, he************* *@gmail.com wrote:
Hi,

I'm currently writting an application and I was wondering if there was
a way to declare a class friend of another during runtime?


Could you explain what that means? Friendship (in the C++ sense) is about
being able to grant access rights during compilation to allow access to
private and/or protected elements of a class. If the class isn't a friend
class at compile time, you can't compile the code, which means there *is
no code* accessing the class that you can even grant access to at runtime.

So even if you could somehow declare the class a friend, what does it
practically gain you, since you can't go back and compile the code you
need?

- Jay

Dec 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1700
by: Newbie | last post by:
Hello! I'm trying to figure out how to do the following: I need to show a table (perhaps using DataGrids, repeaters or others) for each salesperson in the sales dept. But the no. of tables to be shown is to be determined during runtime. It's possible that some salespersons have no sales figures to begin with and therefore no table to...
3
10618
by: Sampson | last post by:
I have a question about enumeration and how to populate them during runtime. I am using vb.net but will happily take any advice in c# as well. Here is an example to help illustrate what I am after. Create a class named “clsMyItems” and in that class place an enum. Public Enum Items Item1 = 0 Item2 = 1 Item3 = 2
10
2137
by: MLH | last post by:
My A97 runtime installations are sometimes paused during the install process prompting user with messages saying the files are in use. Generally, I tell them to click IGNORE. Although I haven't had any noticeable related impact in past installations, I cannot help but wonder what is going on and if my installations are jeopardized because of...
1
2465
by: OrionLee | last post by:
I am using C# to work with a 3rd party DLL (Nevron Charts), and attempting to serialise it. The serialisation itself is handled somewhere inside the DLL, so to get it to happen you call the Nevron's serialiser and then SaveToStream() which will serialises the chart object into a stream for you, which is all well and good... Now for the problem:...
0
7580
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7882
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7945
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6244
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5481
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5208
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3618
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2079
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1194
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.