View Full Version : C++ So odd problem with connection from Form1 "is not namespace name... "

06-07-2008, 04:41 PM
Hi !!!

I have so strange problem... i dont know what i have to do..

Quote from form1.h :

#pragma once
#include "Center.h"
#include <time.h>
#include <windows.h>

namespace RCK {

using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;

/// <summary>
/// Summary for Form1
/// WARNING: If you change the name of this class, you will need to change the
/// 'Resource File Name' property for the managed resource compiler tool
/// associated with all .resx files this class depends on. Otherwise,
/// the designers will not be able to interact properly with localized
/// resources associated with this form.
/// </summary>
public ref class Form1 : public System::Windows::Forms::Form
CCenter^ Engine;
Engine = gcnew CCenter(this);
//TODO: Add the constructor code here


#pragma once
#include "StandsQue.h"
#include "Giver.h"
#include "StandsQue.h"
#include "Form1.h"

public ref class CCenter
void AddGiver(void);
void Work(void);
void AddStand(System::Int32 StandsNumber);
RCK::Form1 Interfejs;

And compiler saying to me :P

1>d:\moje dokumenty\visual studio 2008\projects\rck\rck\Center.h(16) : error C2653: 'RCK' : is not a class or namespace name

Someone know what is this ?? Please...

06-10-2008, 05:41 AM
It's because you define the namespace RCK in a header file AFTER you included Center.h. It should be the other way around.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum