473,785 Members | 2,327 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is it a good thing that program mix C and C++?

Is it a good thing that program mix C and C++?

Mar 28 '07 #1
45 2074

"dolphin" <jd*******@gmai l.comwrote in message
news:11******** *************@p 15g2000hsd.goog legroups.com...
Is it a good thing that program mix C and C++?
You might get output more quickly with a Gemisch. Will you offend the True
Believers, absolutely.
--
lS
Mar 28 '07 #2
On Mar 27, 9:41 pm, "dolphin" <jdxyw2...@gmai l.comwrote:
Is it a good thing that program mix C and C++?
The C++ language includes the standard C libraries. Undoubtably, some
of it is written in C, for almost every instance.

So I think C++ programmers can hardly object.

Mar 28 '07 #3
dolphin wrote:
>
Is it a good thing that program mix C and C++?
Mix, no. You can call C routines from C++, but not the reverse.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home .att.net>

--
Posted via a free Usenet account from http://www.teranews.com

Mar 28 '07 #4
CBFalconer wrote:
dolphin wrote:
>>Is it a good thing that program mix C and C++?


Mix, no. You can call C routines from C++, but not the reverse.
No so, C++ provides a mechanism (the extern "C" linkage specifier) to
make C++ functions callable from C.

--
Ian Collins.
Mar 28 '07 #5
On Mar 28, 9:41 am, "dolphin" <jdxyw2...@gmai l.comwrote:
Is it a good thing that program mix C and C++?
Its depend what all you want to do ?
Are you having some code already available in one lang (or both
lang) ?
do you plan to write user/kernel which code ?
...
...

Nothing is good or bad if used with care and correct usage.

-Raxit

Mar 28 '07 #6
On Mar 28, 11:33 am, CBFalconer <cbfalco...@yah oo.comwrote:
dolphin wrote:
Is it a good thing that program mix C and C++?

Mix, no. You can call C routines from C++, but not the reverse.
one can call c from c++, and viceversa.
>
--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home .att.net>

--
Posted via a free Usenet account fromhttp://www.teranews.co m

Mar 28 '07 #7
"dolphin" <jd*******@gmai l.comwrote:
# Is it a good thing that program mix C and C++?

It is a good thing to get the program finished and running
correctly.
--
SM Ryan http://www.rawbw.com/~wyrmwif/
God's a skeeball fanatic.
Mar 28 '07 #8
Ian Collins said:
CBFalconer wrote:
>dolphin wrote:
>>>Is it a good thing that program mix C and C++?


Mix, no. You can call C routines from C++, but not the reverse.
No so, C++ provides a mechanism (the extern "C" linkage specifier) to
make C++ functions callable from C.
No, it doesn't. It makes C functions callable from C++.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Mar 28 '07 #9
Richard Heathfield wrote:
Ian Collins said:
>>CBFalconer wrote:
>>>dolphin wrote:

Is it a good thing that program mix C and C++?

Mix, no. You can call C routines from C++, but not the reverse.

No so, C++ provides a mechanism (the extern "C" linkage specifier) to
make C++ functions callable from C.

No, it doesn't. It makes C functions callable from C++.
All together now: oh yes it does!

It's commonly used where a C++ function has to be passed to a C library
as a callback.

extern "C" specified the linkage type of the function, not its language.

--
Ian Collins.
Mar 28 '07 #10

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

Similar topics

24
3615
by: matty | last post by:
Go away for a few days and you miss it all... A few opinions... Programming is a craft more than an art (software engineering, not black magic) and as such, is about writing code that works, first and foremost. If it works well, even better. The same goes for ease of maintenance, memory footprint, speed, etc, etc. Most of the time, people are writing code for a use in the *real world*, and not just as an academic exercise. Look at...
36
4657
by: toedipper | last post by:
Hello, I am designing a table of vehicle types, nothing special, just a list of unique vehicle types such as truck, lorry, bike, motor bike, plane, tractor etc etc For the table design I am proposing a single column table with a field name called vehicle_type and this will contain the vehicle type. Sot it will be
39
2860
by: Suresh | last post by:
Hi, I am new to C and curious to know some basic questions about C. Why C is good? In what way its better than any other languages? If it is no longer a choice of programming language...why people still study it? And also its not an OO language either...is there any advantages in being not an OO language? I know one reason is that, IT started with C and so they are still using
113
12356
by: Bonj | last post by:
I was in need of an encryption algorithm to the following requirements: 1) Must be capable of encrypting strings to a byte array, and decyrpting back again to the same string 2) Must have the same algorithm work with strings that may or may not be unicode 3) Number of bytes back must either be <= number of _TCHARs in * sizeof(_TCHAR), or the relation between output size and input size can be calculated simply. Has to take into account the...
13
2105
by: KV | last post by:
I'm new to OO Design, and I'm fixing to start writing my very first C# program. Given the complexity of OO programming, I would like to run something by this group and get general input. My example is a program called HijackThis. I'm sure many are familiar that it is a spyware removal tool. The program looks at over 20 places on Windows computers to see what is starting (with options to remove the offending software). The program can...
11
3809
by: Someonekicked | last post by:
I want to save tables of integers to files. One way to write the cells as fixed size in the file, is to use reinterpret_cast. Is that a bad choice, good choice? I remember once before I posted a program using it, and some suggested that I might get errors using it. are there any other ways to write the cells as fixed size in the file? (knowing the cells will only contain integers). here is how I plan to do it (without much caring...
63
3976
by: John Salerno | last post by:
I know there's a request for a good IDE at least once a week on the ng, but hopefully this question is a little different. I'm looking for suggestions for a good cross-platform text editor (which the features for coding, such as syntax highlighting, etc.) but not a full IDE with all the fancy jazz (GUI developer, UML diagrams, etc.). Ideally, it would be something I could even put on a flash drive and move from computer to computer, but...
6
1874
by: mast2as | last post by:
I have posted a few messages in the last few days about a project I am working on which is a quite simple parser. I ended up using the try/ catch structure as a general mechanism to control what's happening in the program when it finds a syntax error in the file it parses. I would like to know if this is 'an acceptable thing to do' from a programmation point of view, or if I should keep using it only for catch exception created withing the...
0
9647
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9491
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10357
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8988
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7510
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6744
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5397
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4063
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
2
3668
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.