473,398 Members | 2,212 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,398 software developers and data experts.

What is the name of the namespace in C source If I mix C and C++ source in vc .net?

I have an application in visual c++ . net, which involves both c and c++ source, my question is, which namespace is asigned to c sources?

I was able to see C variables with intellisense just by writting "::" before the variable name.
Oct 28 '10 #1
2 1803
Markus
6,050 Expert 4TB
I assume you're using extern "C". C code isn't namespaced, therefore, in C++ code, it is available in the global namespace.

That's my understanding of it.

Mark (is not an expert in C)
Oct 28 '10 #2
Oralloy
988 Expert 512MB
The global namespace "::" is the correct namespace.

I don't know about .net, but in standard C++, you need to be certain that your C source code declarations are prefixed with extern "C", or wrapped, like this
Expand|Select|Wrap|Line Numbers
  1. extern "C" double myFunc1(int j);
  2. extern "C"
  3. {
  4.   int myFunc2(int x, double i);
  5. };
Oct 28 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

14
by: gilad | last post by:
Hi, I have just released the initial beta of a C# project called 'aumplib'. aumplib is a C# namespace which is made up of a set of classes that interface several prominent open source audio...
4
by: smcdanie | last post by:
When trying to view an asp page on my Windows 03 server, I get the following error message: Microsoft OLE DB Provider for ODBC Drivers error '80004005' Data source name not found and no...
0
by: Luca | last post by:
Hello to all, I have a problem during connection to mysql through oledb provider. I use Microsoft Visual C++ with MFC on Windows and I try to connect to mysql with the following call: hResult =...
12
by: bhanu08 | last post by:
I am get this error java.sql.SQLException: Data source name not found and no default driver specified my code for connection is { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");...
1
by: Gourisankar | last post by:
Hi, I am using a VB6 application. While I am trying to access Sybase Database stored procedure through DSR, It is giving the error "Data source name not found or Default driver is not specified" ....
5
by: Darshini | last post by:
Hi When ever opening my asp pages im getting this error..plz give some solution Data source name not found and no default driver specified
0
by: =?Utf-8?B?U2hyaWthbnQgTW9yZQ==?= | last post by:
Using enterprise library's 3.1 Logging Application Block , how can i get the custom source name in the windows event log.When ever i am logging an error in windows event log , it gives the source...
2
by: Archanak | last post by:
Hi, I am uploading a zipfile and i want to copy the file to some other directory i tried like this. Here is the html code: <html> <body> <form method='POST' enctype='multipart/form-data'...
1
by: harsha1302 | last post by:
Hi all i am trying to connect my application written in jsp to the database and i am receiving this exception java.sql.SQLException: Data source name not found and no default driver specified...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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
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
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...

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.