41 Topics

Member Avatar for
Member Avatar for bbman

alright, I'm a bit stuck here, I've tried a few things but I can't figure it out. Question is in the source: [code=c++] // test.h namespace test { class foo { static void test(); }; } [/code] [code=c++] // test.cpp #include "test.h" namespace test { // how can I define …

Member Avatar for bbman
0
132
Member Avatar for edubar

In Robot.h: #include "Motores.h" namespace SoftRobot { ... public ref class Robot : public System::Windows::Forms::Form { .... public: void ComunicarEnviar(System::String^ EnvDados); private: System::Void Robot_Load(System::Object^ sender, System::EventArgs^ e) { Motores ^newMDIChild = gcnew Motores(); newMDIChild->MdiParent = this; newMDIChild->Show(); } }; } In Global.cpp: #include "Robot.h" using namespace SoftRobot; void Robot::ComunicarEnviar(System::String^ EnvDados) …

Member Avatar for daviddoria
0
171
Member Avatar for deepak_1706

I've just started programming in c#, its a simple Forms application with single form. I have a class written in a separate .cs file in its own namespace. The rest of the code is in the Form1.cs file. I am able to create an instance of the my class and …

Member Avatar for deepak_1706
0
656
Member Avatar for qazplm114477

I keep getting an error when I try to instantiate the ArrayIterator class within a name space [CODE]$a = new ArrayIterator; //works just fine namespace test; $a = new ArrayIterator; //get error //Fatal error: Class 'test\ArrayIterator' not found in /www/ on line 3[/CODE] I've been searching the web for hours …

Member Avatar for qazplm114477
0
211
Member Avatar for qazplm114477

Lets say I have a bunch of classes that works pretty well without any error, and lets say that I want to introduce name spaces to my system. Before I start adding [CODE]namespace MyNamesSpace;[/CODE] to all my classes, I want to know if there are any precautions I have to …

0
93
Member Avatar for iw2z

Hi everyone, I'm doing a little project after a long period of no c++, so please forgive me for any possible stupid mistakes. Basically I have 2 cpp files, in first.cpp I define namespace 'myNS', and in second.cpp I define class 'myClass'. The problem is that I have a pointer …

Member Avatar for mike_2000_17
0
261
Member Avatar for hgbreton

I need to create a SOAP wrapper of the form [CODE=xml] <SOAP-ENV:Envelope xmnls=........><SOAP-ENV:Body></SOAP-ENV:Body></SOAP-ENV:Envelope> [/CODE] My C# code to do this is as follows [CODE=C#] XmlElement soapEnvelope = document.CreateElement("SOAPENV", "Envelope", "http://schemas.xmlsoap.org/soap/envelope"); XmlElement soapBody = document.CreateElement("SOAPENV", "Body", "http://schemas.xmlsoap.org/soap/envelope"); [/CODE] This works fine for the Envelope part but then adds a spurious xmnls …

Member Avatar for kvprajapati
0
412
Member Avatar for enigmaYes

Hey guys. This is an assignment I've been given by my professor for a C++ course. The assignment description is below: [COLOR="Green"]Create a class ThreeDShape that has a default constructor and pure virtual functions double getSurfaceArea(), double getVolume() and void print(). Function getSurfaceArea() should compute and return the surface area …

Member Avatar for NathanOliver
0
237
Member Avatar for maddav

Hi, Recently (today) got an assignment to take a particular code that we've done previously, and split it into 3 files: 2 .cpp files and a header file. Now, i believe i've done it correctly, but the only thing that's throwing up errors is the use of friend for overloading …

Member Avatar for maddav
0
3K
Member Avatar for lewashby

I'M trying to learn to program through C#. The book I'M reading is trying to explain namespaces but I'M failing to understand it. As I understand it, a class is a blueprint for an object and, and a class is just a special block of code. So what exactly is …

Member Avatar for kvprajapati
0
115
Member Avatar for arun_354

The End.