473,490 Members | 2,488 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

if you inline a functon

hi All,

I am making the overloading operator code as inline in a C file.

Some thing like

struct A { int a};

typedef A aaaa;

int aaaa& aaaa::operator|= (aaaa& a) { }

Now, will this operators not be overloaded in other places, where I do
the same typedef.
?
Remember, i am not using header files at all here.
Nov 21 '07 #1
4 1189
pa********@hotmail.com wrote:
hi All,

I am making the overloading operator code as inline in a C file.
Not in C you aren't! Try c.l.c++.

--
Ian Collins.
Nov 21 '07 #2
<pa********@hotmail.comschrieb im Newsbeitrag
news:b6**********************************@f13g2000 hsa.googlegroups.com...
hi All,

I am making the overloading operator code as inline in a C file.

Some thing like

struct A { int a};

typedef A aaaa;

int aaaa& aaaa::operator|= (aaaa& a) { }

Now, will this operators not be overloaded in other places, where I do
the same typedef.
?
Remember, i am not using header files at all here.
This C++, not C, whch doesn't have operator overloading, so ask in
comp.lang.c++

Bye, Jojo
Nov 21 '07 #3
In article
<b6**********************************@f13g2000hsa. googlegroups.com>,
pa********@hotmail.com <pa********@hotmail.comwrote on Wednesday 21
Nov 2007 2:11 pm:
hi All,

I am making the overloading operator code as inline in a C file.
This is disallowed in Standard C. Implementations like lcc-win32 provide
operator overloading but you should ask, in that case, in
<news:comp.compilers.lcc>. If you are using C++ ask in
<news:comp.lang.c++>.

<snip>

Nov 21 '07 #4
pa********@hotmail.com wrote:
hi All,

I am making the overloading operator code as inline in a C file.
You are wrong about that because ...
Some thing like
struct A { int a};
typedef A aaaa;
int aaaa& aaaa::operator|= (aaaa& a) { }
^^^^^^^^^^^^^^^^
This is gibberish in C.
Nov 21 '07 #5

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

Similar topics

46
6887
by: DJ WIce | last post by:
Hi all, I did make a script/css thing to replace the contextmenu on the website with a new one: http://www.djwice.com/contextmenu.html It works nice in MSIE, but on Netscape (and probable...
14
2739
by: Chris Mantoulidis | last post by:
I am not clear with the use of the keyword inline... I believe you add it do a function when you implement the function inside the header file where the class is stored... But is that all? What...
47
3795
by: Richard Hayden | last post by:
Hi, I have the following code: /******************************** file1.c #include <iostream> extern void dummy(); inline int testfunc() {
20
3104
by: Grumble | last post by:
Hello everyone, As far as I understand, the 'inline' keyword is a hint for the compiler to consider the function in question as a candidate for inlining, yes? What happens when a function with...
7
2844
by: Srini | last post by:
Hello, Rules for inline functions say that they have to be defined in the same compilation unit as their declarations. For class member functions this means that the inline member functions must...
6
3976
by: RainBow | last post by:
Greetings!! I introduced the so-called "thin-template" pattern for controlling the code bloat caused due to template usage. However, one of the functions in the template happens to be virtual...
12
676
by: sam_cit | last post by:
Hi Everyone, I have few questions on inline functions, when i declare a function as inline, is it for sure that the compiler would replace the function call with the actual body of the function?...
5
1904
by: Barry | last post by:
Hi, group First, I write same cases I've already known, I don't concern that specific compiler really do inline or not. Please check them if they are right, and add the cases I miss 1. //...
2
1545
by: Barry | last post by:
Hi, group First, I write same cases I've already known, I don't concern that specific compiler really do inline or not. Please check them if they are right, and add the cases I miss 1. //...
0
7108
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6967
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...
0
7181
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7352
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...
0
5445
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,...
0
4565
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...
0
3078
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
272
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.