473,383 Members | 1,821 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,383 software developers and data experts.

multiple namespaces

bob
how do you import multiple namespaces from the same header?

Apr 23 '06 #1
4 2322
bo*@coolgroups.com wrote:
how do you import multiple namespaces from the same header?

How do you define import?

--
Ian Collins.
Apr 23 '06 #2
<bo*@coolgroups.com> wrote in message
news:11*********************@u72g2000cwu.googlegro ups.com...
how do you import multiple namespaces from the same header?


Please explain what you want. It could be as simple as:
using namespace name1;
using namespace name2;

Apr 23 '06 #3
bob
i'm thinking of something like this:

#include "matrixlib.h"
using namespace name1;
using namespace name2;

but i don't think that works.

Apr 23 '06 #4
<bo*@coolgroups.com> wrote:
i'm thinking of something like this:

#include "matrixlib.h"
using namespace name1;
using namespace name2;

but i don't think that works.


I'm not sure I know what you want. This works, does it help?

#include <iostream>
#include <cmath>

namespace abc {
//------------------------
// return the sine of an angle expressed in degrees
double sin(double th)
{
static const double pi = 3.14159;
return std::sin(th * pi / 180.);
}
} // end namespace abc

using namespace std;
//===================
int main()
{
cout << abc::sin(45.) << endl; // degrees
cout << std::sin(.98); // radians
cin.get();
}
Apr 23 '06 #5

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

Similar topics

1
by: DKode | last post by:
I have 2 projects in a solution: Web EmployeeManagement The namespace for Web is : CompanyName.Hybrid.Web The namespace for EmployeeManagement is just : CompanyName.Hybrid ...
3
by: Tom Kelleher | last post by:
Question: Can namespaces be shared by several projects within a solution, if those projects use different languages? We wrote some db code in C#, and some biz logic in VB.NET. We brought both...
3
by: John Smith | last post by:
Ok, I am not sure if it is possible. But what I'm trying to do is validate an XML file with out having to add namespace in the xml. What I mean is lets say I have 2 XSD they have different...
2
by: Jack Li | last post by:
Hi, If I declare multiple namspaces, each in a separate file, how do I specify their path with the "using" directives? Say I have 2 namespaces and 1 main function, all in separate files such as...
6
by: Orgun | last post by:
Hi, I sent this message to the moderated c++ group too but it is waiting for moderator approval and I wanted to send here too. I am new to Design Patterns. I want to write a simple...
0
by: Dave | last post by:
Hello all, Firstly I hate Citrix, especially their programming interface MFCOM. There are multiple versions, that seem to need to match an SDK Version <----Citrix Server Version This is bad...
1
by: icfai | last post by:
hi friends.... I have got a problem regarding loading of multiple assemblies, actually its required for an editor which implements the intellisenseas in vb or dotnet. for that it is required to...
0
by: blat001 | last post by:
Hi, Not 100% sure if this is the correct group to post in but. I have a class that I want to serialize/deserialize to match the MM7 specifications, which I have done but now that we are...
0
by: =?Utf-8?B?Q2FtZWw=?= | last post by:
For anyone who has utilised classes under XSD.exe and CodeDOM (please redirect me to another group perhaps if not here) please any ideas on how to translate the multiple namespaces present within...
1
camel
by: camel | last post by:
For anyone who has utilised classes under XSD.exe and CodeDOM, please any ideas on how to translate the multiple namespaces present within multiple XmlSchema , i.e., via xs:import, to multiple output...
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
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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?

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.