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

function does not take number parameters in namespace

hi,
i create several new class in the my namespace, these class have the
same name of functions that are be referenced each other. the vc 2005
complier spawns the c2660 error.
source code:
// gcChar.h file
namespace gc{

class gcChar{
public:
gcChar():ch_(0x0){};
gcChar(GCCHAR c):ch_(c){};
gcChar(GCWCHAR c):ch_(c){};

gcChar(GCUCHAR c, GCUCHAR r): ch_((r << 8)|c){};

gcChar(gcChar const& c):ch_(c.ch_){};

gcChar(short rc){
GCUSHORT r = static_cast<GCUSHORT>(rc);
ch_ = static_cast<GCWCHAR>(r);
};

gcChar(GCUINT rc){
ch_ = static_cast<GCWCHAR>(rc & 0xffff);
};

gcChar(int rc){
GCUSHORT r = static_cast<GCUSHORT>(rc & 0xffff);
ch_ = static_cast<GCWCHAR>(r);
};

public:
gcChar lower() const;
};

inline gcChar lower(gcChar const& c){

return gcChar(tolower((GCUCHAR)c.latin1()));
};

inline gcChar gcChar::lower() const{

return lower(*this);
};

}

//gcString.h
namespace gc{

class gcString{
public:
gcString();
gcString(gcChar const& );
gcString(gcString const& );
gcString(gcChar const* , GCUINT);
gcString(const char* ch );
~gcString();

gcString const & operator=( char const* c )
gcString const& operator=( gcString const& c );
gcString const& operator=( gcChar const& c );
gcString const& operator=( char c );

gcWString lower() const;
int find(gcChar c, int index=0, bool cs = true) const;
operator const char* () const{return ascii();};
Apr 24 '06 #1
2 1074
kuoxin wrote:
inline gcChar lower(gcChar const& c){

return gcChar(tolower((GCUCHAR)c.latin1()));
};

inline gcChar gcChar::lower() const{

return lower(*this);
};


Try gc::lower(*this).

Tom
Apr 24 '06 #2
thanks.
kuoxin
Apr 25 '06 #3

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

Similar topics

11
by: JKop | last post by:
Take the following simple function: unsigned long Plus5Percent(unsigned long input) { return ( input + input / 20 ); } Do yous ever consider the possibly more efficent:
8
by: Muthu | last post by:
I've read calling conventions to be the order(reverse or forward) in which the parameters are being read & understood by compilers. For ex. the following function. int Add(int p1, int p2, int...
11
by: Neo | last post by:
Why the following code is compilable? The function abc() doesn't take any arguments, still i can call the function with arbitraty number of arguments. Even compiler doesn't show any warning. What...
0
by: Richard Gregory | last post by:
Hi, I have the wsdl below, for an Axis web service, and when I select Add Web Refernce in Visual Studio the proxy is missing a class representing the returnedElementsType (see reference.cs below...
18
by: John Friedland | last post by:
My problem: I need to call (from C code) an arbitrary C library function, but I don't know until runtime what the function name is, how many parameters are required, and what the parameters are. I...
2
by: cgv | last post by:
Hi, I want to distinguish between an int parameter to a template function depending on whether its value is known at compile time or not. For the compile time version I want to call the function...
4
by: Tony Lownds | last post by:
(Note: PEPs in the 3xxx number range are intended for Python 3000) PEP: 3107 Title: Function Annotations Version: $Revision: 53169 $ Last-Modified: $Date: 2006-12-27 20:59:16 -0800 (Wed, 27 Dec...
11
by: Felix Kater | last post by:
Hi, I can compile and run this code (see below) which twice calls the function f, first with too less, second with too much arguments. But is it legal and free of memory leaks and other...
16
by: arne | last post by:
Hi all, imagine I call a function, but omit one of the parameters, like: foo.c: void foo( int a, int b ) { /* do something with a and b */ return; }
8
by: Jon Harrop | last post by:
I am trying to learn C# and .NET programming in general but I am finding it very hard going. To start with, I'd like to translate some trivial functions from other languages that I am familiar with...
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: 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
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,...
0
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...
0
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,...
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...

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.