Monday, December 2, 2013

How am I supposed to define this namespace variable?

Newsgroup: comp.lang.c++

Subject: How am I supposed to define this namespace variable?

From: "A" <a@...>

Date: Mon, 2 Dec 2013 18:57:01 +0100



Header file:



namespace MyNameSpace

{

extern const wchar_t CharArr[];

extern const int IntArr[];

}



Src file:



const wchar_t MyNameSpace::CharArr[] = "abc";

const int MyNameSpace::IntArr[5] = { 1,2,3,4,5};





-- the problem - when I access these variables I get a runtime error as if I

was trying to access undefined part of memory. But I don't understand why...

variable should be defined and debugger sees them.











via Usenet Forums - Usenet Search,Free Usenet - comp.lang.c++ http://www.pocketbinaries.com/usenet-forums/showthread.php?140882-How-am-I-supposed-to-define-this-namespace-variable&goto=newpost

View all the progranning help forums at:

http://www.pocketbinaries.com/usenet-forums/forumdisplay.php?128-Coding-forums

No comments:

Post a Comment