Click here to Skip to main content
15,908,020 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Retrieve the file names from a dir? Pin
Rickard Andersson2015-Dec-02 6:15
Rickard Andersson2015-Dec-02 6:15 
GeneralProxy Scanner Pin
Trin214-Dec-02 22:20
Trin214-Dec-02 22:20 
GeneralRe: Proxy Scanner Pin
l a u r e n15-Dec-02 3:34
l a u r e n15-Dec-02 3:34 
GeneralRe: Proxy Scanner Pin
Taka Muraoka15-Dec-02 4:04
Taka Muraoka15-Dec-02 4:04 
GeneralCFile Question Pin
John Clump14-Dec-02 20:09
John Clump14-Dec-02 20:09 
GeneralRe: CFile Question Pin
Trin214-Dec-02 22:13
Trin214-Dec-02 22:13 
GeneralRe: CFile Question Pin
Dudi Avramov14-Dec-02 23:16
Dudi Avramov14-Dec-02 23:16 
QuestionCSimpleArray ? Pin
ZBUILDER14-Dec-02 19:35
ZBUILDER14-Dec-02 19:35 
Excuse me.
Today,I study the WTL Library's CSimpleArray class source code,I find the following code:
<code>template<class T>
class CSimpleArray
{
      T* m_aT;
      ...

	class Wrapper
	{
	public:
		Wrapper(T& _t) : t(_t)
		{
		}
		template <class _Ty>
		void *operator new(size_t, _Ty* p)
		{
			return p;
		}
		T t;
	};
	void SetAtIndex(int nIndex, T& t)
	{

		new(&m_aT[nIndex]) Wrapper(t);
	}
   ...
}</code>   
I can not understand the syntax about "new(&m_aT[nIndex]) Wrapper(t)"Confused | :confused: ,anyone can explain it? thanks first.

SIMPLE IS BEAUTY
AnswerRe: CSimpleArray ? Pin
Renjith Ramachandran14-Dec-02 20:13
Renjith Ramachandran14-Dec-02 20:13 
GeneralRe: CSimpleArray ? Pin
ZBUILDER14-Dec-02 20:18
ZBUILDER14-Dec-02 20:18 
GeneralRe: CSimpleArray ? Pin
Jörgen Sigvardsson15-Dec-02 4:28
Jörgen Sigvardsson15-Dec-02 4:28 
AnswerRe: CSimpleArray ? Pin
Jörgen Sigvardsson15-Dec-02 4:29
Jörgen Sigvardsson15-Dec-02 4:29 
GeneralHelp with context menu programming. Pin
trustno114-Dec-02 15:43
trustno114-Dec-02 15:43 
GeneralTemplate class question... Pin
Matt Gullett14-Dec-02 14:56
Matt Gullett14-Dec-02 14:56 
GeneralRe: Template class question... Pin
Taka Muraoka14-Dec-02 15:51
Taka Muraoka14-Dec-02 15:51 
GeneralRe: Template class question... Pin
Matt Gullett14-Dec-02 16:03
Matt Gullett14-Dec-02 16:03 
GeneralRe: Template class question... Pin
Taka Muraoka14-Dec-02 16:17
Taka Muraoka14-Dec-02 16:17 
GeneralRe: Template class question... Pin
Matt Gullett14-Dec-02 16:45
Matt Gullett14-Dec-02 16:45 
GeneralRe: Template class question... Pin
Taka Muraoka14-Dec-02 16:55
Taka Muraoka14-Dec-02 16:55 
GeneralRe: Template class question... Pin
Matt Gullett14-Dec-02 17:04
Matt Gullett14-Dec-02 17:04 
GeneralRe: Template class question... Pin
Todd Smith14-Dec-02 17:11
Todd Smith14-Dec-02 17:11 
GeneralRe: Template class question... Pin
Matt Gullett14-Dec-02 17:23
Matt Gullett14-Dec-02 17:23 
GeneralHelp on Overlapped Serial IO Pin
work_to_live14-Dec-02 13:44
work_to_live14-Dec-02 13:44 
GeneralRe: Help on Overlapped Serial IO Pin
work_to_live14-Dec-02 14:21
work_to_live14-Dec-02 14:21 
GeneralRe: Help on Overlapped Serial IO Pin
Michael Dunn14-Dec-02 15:55
sitebuilderMichael Dunn14-Dec-02 15:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.