The `using` directive, available in several languages including C# and C++, introduces members of a namespace into the current identifier search scope.
0
votes
2answers
38 views
Remove 'using System.Linq' statment from all C# pages
I have this source in all the c# pages
using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
...
0
votes
0answers
19 views
Is it possible “Using with alias at runtime”?
namespace
{
using Itest = IMyInterface
}
Then I use the Itest for rest of code But as per new requirement,
based on some conditions i need to set the alias at runtime. >Like
using ...
1
vote
4answers
97 views
In C#, is it more performant to use fully qualified names vs the 'using' directive?
In C#, when you add a using directive for a namespace, it gives you access to all the types in that specific namespace. However, if the namespace has a lot of types and I only need one particular one, ...
2
votes
3answers
299 views
How to properly bind scope between directive and controller with angularJS
I'm trying to generate an n-level hierarchical unordered list with anugularJS, and have been able to successfully do so. But now, I'm having scope issues between the directive and controller. I need ...
0
votes
0answers
48 views
Why can't I use using to disambiguate between base members variables?
In this simple class hierarchy I'm trying to get class C to disambiguate which x to use by telling it "using B::x" but this doesn't compile in G++ because it still can't figure out which x I mean in ...
9
votes
1answer
116 views
What is the namespace 'Standard'?
When I try to write a new using clause, I notice that Intellisense has, in its list, a namespace called Standard. However, this seems to have no members on closer inspection. What is this namespace?
1
vote
1answer
113 views
Converting GCC assembly code to armasm assembly code
I am trying to convert GCC assembly code to ARMASM assembly code can anyone please help me with this. The main problem is .req .unreq .qn.dn . I wanted to know the equivalents of the above ...
5
votes
5answers
223 views
why swap() can work well when I don't call it with two pointer?
#include <iostream>
using namespace std;
void swap(int *a, int *b){
*a = *a^*b;
*b = *a^*b;
*a = *a^*b;
}
int main()
{
int array[]={1,9,2,8,3,7};
for(int i=0; ...
10
votes
1answer
186 views
static constexpr member function in templated using expression not found
For the following code
#include <array>
template<unsigned MaxP, typename type>
struct kernel
{
static constexpr unsigned max_pole(unsigned P)
{ return P>MaxP? MaxP:P; }
...
5
votes
2answers
118 views
Forward declarations cause errors after code refactor
My original class structure was similar to:
//def.h
namespace A
{
struct X {};
}
and forward declarations where needed:
//file that needs forward declarations
namespace A { struct X; }
After ...
1
vote
1answer
76 views
include and using declaration
using ::bb::cascades::Application;
#include <bb/cascades/Application>
What do these two declaration mean?
And are there any good tutorials which states the using directive/declaration ...
3
votes
2answers
60 views
Is it possible to revert back to “default” global namespace?
Basically, I am working with some provided header files with the following format:
#include <iostream>
using namespace std;
class bar
{
public:
void printSomething(void)
{
...
3
votes
2answers
75 views
Using-like statement for template specialization
Suppose there is the following definition in a header
namespace someNamespace {
template<class T, class S>
int operator + (const T & t, const S & s) {
return specialAdd ...
1
vote
6answers
196 views
C# using system.io not woking in my class but works in main
I am working on an issue I do not remember ever having before.
I am using VS2012 C#
when i add using System.IO; to my main program everything works fine, however when I add it to my class file it ...
2
votes
1answer
141 views
why it is not possible to implement inherited pure virtual method with 'using' directive? [duplicate]
Possible Duplicate:
Why does C++ not let baseclasses implement a derived class' inherited interface?
#include <iostream>
class Interface
{
public:
virtual void yell(void) = ...