473,385 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 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 943
>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; ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.