472,973 Members | 2,373 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,973 software developers and data experts.

c or cpp for extension

I am writing a program that is not OO.

I tried using the c extension but that has too many restrictions (for me).

So I changed the extension to cpp and wonder if the compiler is simply more
allowable or am I getting some other overhead that I don't know about.

Bottom line question, does using cpp for for an non-OO program bring with it
any penalty?

Thanks
Feb 17 '06 #1
6 930
>I am writing a program that is not OO.

I tried using the c extension but that has too many restrictions (for me).

So I changed the extension to cpp and wonder if the compiler is simply
more allowable or am I getting some other overhead that I don't know
about.

Bottom line question, does using cpp for for an non-OO program bring with
it any penalty?

If you use only the C subset, and basically use CPP as a flexible C, then
there will be no noticable overhead.
to verify this, build a simple program, and compile it as C and as C++.
you can then compare exe size and execution speed.

--

Kind regards,
Bruno.
br**********************@hotmail.com
Remove only "_nos_pam"
Feb 17 '06 #2
>Bottom line question, does using cpp for for an non-OO program bring with it
any penalty?


It shouldn't do.

Dave
Feb 17 '06 #3
great, thanks
"Bruno van Dooren" <br**********************@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I am writing a program that is not OO.

I tried using the c extension but that has too many restrictions (for
me).

So I changed the extension to cpp and wonder if the compiler is simply
more allowable or am I getting some other overhead that I don't know
about.

Bottom line question, does using cpp for for an non-OO program bring with
it any penalty?

If you use only the C subset, and basically use CPP as a flexible C, then
there will be no noticable overhead.
to verify this, build a simple program, and compile it as C and as C++.
you can then compare exe size and execution speed.

--

Kind regards,
Bruno.
br**********************@hotmail.com
Remove only "_nos_pam"

Feb 17 '06 #4
thanks

"David Lowndes" <Da****@example.invalid> wrote in message
news:i7********************************@4ax.com...
Bottom line question, does using cpp for for an non-OO program bring with
it
any penalty?


It shouldn't do.

Dave

Feb 17 '06 #5
academic wrote:
Bottom line question, does using cpp for for an non-OO program bring with it
any penalty?


You may want to disable some C++ language features to remove penalty
associated with them, such as exception support and RTTI.

Tom
Feb 18 '06 #6
I'll look into that
thanks

"Tamas Demjen" <td*****@yahoo.com> wrote in message
news:ux**************@TK2MSFTNGP10.phx.gbl...
academic wrote:
Bottom line question, does using cpp for for an non-OO program bring with
it any penalty?


You may want to disable some C++ language features to remove penalty
associated with them, such as exception support and RTTI.

Tom

Feb 18 '06 #7

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

Similar topics

6
by: Gyger | last post by:
Hello, Three weeks ago, I have started to develop a binding extension for Qt and PHP 5. Now, I can display a dialog box containing some widgets like label, buttons and edit line. I have just...
8
by: Torsten Mohr | last post by:
Hi, i write an extension module in C at the moment. This module does some work on some own data types that consist of some values. The functions that can change the data are written in C. ...
3
by: man-in-nature | last post by:
Hello, I have already read several existing posts about xsd:extension, but do not find something useful to my test case. I have one xml file and one xsd file. I can use a simple command line...
5
by: Jeffry van de Vuurst | last post by:
Hi, I'm working on an xml schema and I'm running into some problems relating substitutionGroups and extensions. This xsd validates fine: There are three elements and three complex types and...
7
by: Adam | last post by:
Im trying to add an httphandler for all *.sgf file extensions. I have developed the handler, 1. installed it into the gac 2. added it to the machine.config: <httpHandlers> <add verb="*"...
4
by: pepcag | last post by:
I used http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconalteringsoapmessageusingsoapextensions.asp as a template to create a very simple web method with soap...
1
by: Brian Henry | last post by:
Just thought maybe someone here would like to know this. It's an example code I just created quickly on how to figure out the name of a type of file based on its extension (say for example .DOC)...
0
by: robert | last post by:
Hi all, I'm having a hard time resolving a namespace issue in my wsdl. Here's an element that explains my question, with the full wsdl below: <definitions name="MaragatoService"...
6
by: tommybiegs | last post by:
I'm having a weird problem. I can't seem to force php to load an extension using php.ini, but it loads perfectly if I use dl() at the beginning of a test script. In php.ini I've got: ...
1
Ganesh9u
by: Ganesh9u | last post by:
Hi All, import org.sf.feeling.swt.win32.extension.hook.Hook; import org.sf.feeling.swt.win32.extension.hook.data.HookData; import org.sf.feeling.swt.win32.extension.hook.data.MouseHookData; ...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...

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.