Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 [1842] Create implementation

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
Mariano Posted - Feb 09 2011 : 08:40:49 AM
Hello,

Let's make a class in *.h file:


#pragma once

namespace NA
{
	namespace NB
	{
		class CTestClass
		{
		public:
			struct STestStruct
			{
				size_t A;
				bool   b;
			};

		public:
			CTestClass( void );
			~CTestClass( void );

			STestStruct Get();
		};

	};
};


Below I describe 2 problems with 'Create implementation' function:

Problem 1:
According to previous *.h file I have *.cpp file with code:

#include "StdAfx.h"
#include "TestClass.h"

namespace NA
{
	namespace NB
	{};
};


After using " create implementation" on constructor I got:

#include "StdAfx.h"
#include "TestClass.h"

namespace NA
{
	namespace NB

		CTestClass::CTestClass( void )
	{

	}
	{};
};


Implementation is not in brackets so code will not compile

Problem 2:

I have the same header as previous and my implementation in *.cpp looks:

#include "StdAfx.h"
#include "TestClass.h"
namespace NA
{
	namespace NB
	{
		CTestClass::CTestClass( void )
		{}

	};
};


After "create implementation" on "STestStruct Get();" member I got:


#include "StdAfx.h"
#include "TestClass.h"

namespace NA
{
	namespace NB
	{
		CTestClass::CTestClass( void )
		{}

		STestStruct CTestClass::Get()
		{
		}
	};
};


The CTestClass is ommited in Get() function definition.
STestStruct CTestClass::Get() should be: CTestClass::STestStruct CTestClass::Get()

Regards, Mariusz.
1   L A T E S T    R E P L I E S    (Newest First)
accord Posted - Feb 09 2011 : 5:27:31 PM
I am seeing the the effect here.

The assigned case for problem 1 is case=43387

The case number for problem 2 is case=1247

Thank you for the clear description and the code snippets.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000