Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 [1842] Create implementation
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Mariano
New Member

Poland
6 Posts

Posted - Feb 09 2011 :  08:40:49 AM  Show Profile  Reply with Quote
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.

Edited by - Mariano on Feb 09 2011 08:45:47 AM

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Feb 09 2011 :  5:27:31 PM  Show Profile  Reply with Quote
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.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000