|
Hi,
I want to learn ATL. and I dont know any thing about ATL programming. Please send URLs for downloding any free PDF's, and please sujjest me the approach for learnig ATL.
Thnaks In Advance.
sampath-padamatinti
|
|
|
|
|
sampath-padamatinti wrote: I want to learn ATL
It is a demanding aim expecially when you miss the right forum [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
sampath-padamatinti wrote: please sujjest me the approach for learnig ATL.
A wise approach would be to locate the beginner level articles on ATL here at CP and start reading those.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
I want to set background color of menu and submenu in dialog based application in vc++,mfc
|
|
|
|
|
|
How to display context menu on rightbutton click of mouse in richedit textbox control in vc++.In my application it will display context menu on dialog box on rightbutton click of mouse.but i want to show it on richedit tcontrol textbox in vc++,mfc
|
|
|
|
|
I assume that you mean you want to display your application's context menu. In which case you need to subclass the richedit control and capture the right click message in the window's message handler.
|
|
|
|
|
Hello all,
i have a WSDL of .net based web service.
i need to call methods from that webservice using soap. i made all the supporting files and trying to call methods as follows:
struct soap soap;
soap_init(&soap);
ns1__loginVisitor.name = (char *)calloc(1, strlen("Test") + 1);
strcpy(ns1__loginVisitor.name ,"Test");
ns1__loginVisitor.pwd = (char *)calloc(1, strlen("12345") + 1);
strcpy(ns1__loginVisitor.pwd ,"12345");
ns1__loginVisitor.memorizeLogin = xsd__boolean__false_;
stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]];
ns1__loginVisitor.moduleType = (char *)calloc(1, strlen("Contact Directory") + 1);
strcpy(ns1__loginVisitor.moduleType , "Contact Directory");
struct _ns1__loginVisitorResponse ns1__loginVisitorResponse;
struct _ns1__getCountriesResponse ns1__getCountriesResponse;
&ns1__getAccountInfoResponse);
soap_call___ns2__getCountries(&soap, NULL,NULL,NULL,&ns1__getCountriesResponse);
if(soap_call___ns2__loginVisitor(&soap, NULL,NULL, &ns1__loginVisitor, &ns1__loginVisitorResponse) == SOAP_OK)
{
NSInteger yu = 90;
}
but i am not getting proper response from the webservice.
can any body tell me where i am wrong? or please suggest me.
|
|
|
|
|
I have been trying to figure out what is wrong with this code. its probably something really obvious just that isn't clear to me. I would like any help that can be given, thanks.
int main(int argc,char* argv[])
{
Animals *ourAnimals[6];
Animals *goldfish = new Goldfish();
Animals *crocodile = new Crocodiles();
Animals *elephant = new Elephants();
Animals *gazelles = new Gazelles();
Animals *shark = new Sharks();
Animals *snakes = new Snakes();
ourAnimals[0]=goldfish;
ourAnimals[1]=crocodile;
ourAnimals[2]=elephant;
ourAnimals[3]=gazelles;
ourAnimals[4]=shark;
ourAnimals[5]=snakes;
string name, gender, weight;
name = "the Goldfish";
gender = "Female";
weight = "One Ounce";
goldfish -> setName(name);
goldfish -> setGender(gender);
goldfish -> setWeight(weight);
}
and this is the class
#pragma once
#include <iostream>
#include <string>
using namespace std;
class Animals
{
public:
Animals(void);
virtual ~Animals(void);
string getName() {return m_name;}
string setName(string &name){return m_name = name;}
string getGender(){return m_gender;}
string setGender(string &gender){return m_gender = gender;}
string getWeight(){return m_weight;}
string setWeight(string &weight){return m_weight = weight;}
virtual void goOut() = 0;
virtual void converse() = 0;
virtual void getBack() = 0;
protected:
string m_name;
string m_gender;
string m_weight;
};
it gives me an unhandled exception error.
this is my goldfish class
#pragma once
#include "marine.h"
class Goldfish :
public Marine
{
public:
Goldfish(void);
virtual ~Goldfish(void);
virtual void converse();
};
Goldfish::Goldfish(void)
{
}
Goldfish::~Goldfish(void)
{
}
void Goldfish::converse()
{
cout<<"The Gold fish speak: "<<"Bloob Bloob"<<endl<<endl;
}
there is another derived class from Animal which is Called Marine in this case which looks like this
#pragma once
#include "animals.h"
class Marine :
public Animals
{
public:
Marine(void);
virtual ~Marine(void);
virtual void goOut();
virtual void converse()= 0;
virtual void getBack();
};
#include "Marine.h"
Marine::Marine(void)
{
}
Marine::~Marine(void)
{
}
void Marine::goOut()
{
cout<<"The Marine animals: "<<"swim out and are fed"<<endl<<endl;
}
void Marine::getBack()
{
cout<<"The Marine animals: "<<"Swim in"<<endl<<endl;
}
another thing to add is that if I move around the order of the protected variables. The error is always on the thrid variable
protected:
string m_weight;
string m_name;
string m_gender;
modified on Tuesday, September 22, 2009 9:23 AM
|
|
|
|
|
Hi,
You don't need to return anything from your setters. Make them void like this:
void setName(const string& name){m_name = name;}
void setGender(const string& gender){m_gender = gender;}
void setWeight(const string& weight){m_weight = weight;}
Try this and if you still get error messages, please post the exact message here.
Nuri Ismail
|
|
|
|
|
this doesn't help, I get
Unhandled exception at 0x1026edac (msvcr90d.dll) in Zoo.exe: 0xC0000005: Access violation writing location 0xcdcdcdcd
|
|
|
|
|
Sivyo wrote: Unhandled exception at 0x1026edac (msvcr90d.dll) in Zoo.exe: 0xC0000005: Access violation writing location 0xcdcdcdcd
Most likely, you are either accessing a memory location that is not been allocated or has been freed already.
I've tried the code from your modified post and it works fine.
Maybe you should go step by step through your main method and track your heap objects.
You should also use the call stack window in order to see the exact position of the crash in your code.
Nuri Ismail
|
|
|
|
|
I don't actually know how to use the call stack window. I will google it see if that will help.
I did debug it and create break points and it always crashes right after set weight.
I checked out the watch. and everything goes where it is supossed to but then it just crashes right after everything is set.
I commented out set weight and it seems that is the problem, it doesn't crash if I take it out
|
|
|
|
|
Sivyo wrote: I commented out set weight and it seems that is the problem, it doesn't crash if I take it out
Don't be so sure. You may have just moved the problem to another, less-sensitive location.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
well, apparently something was wrong with that computer. I was working with it at school and now that I am home, the program works fine.
Makes me feel really stupid.... worked 4 hours on that thing and the problem was with the computer. i didn't get anything done....
|
|
|
|
|
Post ere more info about the unhandled exception (the debugger helps a lot, see for instance the call stack window).
BTW you didn't post the Goldfish class code.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
the debuggers shows me this window and shows me where it stops...
LeadUp1:
and edx,ecx ;U - trailing byte count
mov al,[esi] ;V - get first byte from source
it stops here
-> mov [edi],al ;U - write second byte to destination
mov al,[esi+1] ;V - get second byte from source
mov [edi+1],al ;U - write second byte to destination
mov al,[esi+2] ;V - get third byte from source
it compiles it fine, but once it executes it I get the
Unhandled exception at 0x1026edac (msvcr90d.dll) in Zoo.exe: 0xC0000005: Access violation writing location 0xcdcdcdcd
|
|
|
|
|
|
I modified my origional post. Its all up there
|
|
|
|
|
Your code is working fine on my system, however I had to do the following modifications, in order to compile it:
Commented out few lines (I haven't all your animal classes ), hence
int main(int argc,char* argv[])
{
Animals *ourAnimals[6];
Animals *goldfish = new Goldfish();
ourAnimals[0]=goldfish;
string name, gender, weight;
name = "the Goldfish";
gender = "Female";
weight = "One Ounce";
goldfish -> setName(name);
goldfish -> setGender(gender);
goldfish -> setWeight(weight);
}
Added the constructor and destructor for the Animals (misname? Wouldn't be better 'Animal'?) class:
class Animals
{
public:
Animals(void){};
virtual ~Animals(void){};
Again and again: use the debugger and have a look at the call stack window.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
noticed (with some help from inside sources) that in the problem is with the compiler for some odd reason it doesn't like creating a 3rd variable of string in Animals.
I moved weight be to be first and name was last (3rd) then it showed Bad ptr message in the debugger.
its a very strange error....
|
|
|
|
|
Sivyo wrote: In main() you have
goldfish -> setName(name);
but in class Animals you have
string setName(string &name){return m_name = name;}
I think your setName() definition should read:
string setName(string name){return m_name = name;}
Also as mentioned previously there is little to be gained in the setXXX() functions in returning the parameter values. Using void return types is better as:
void setName(string name)
{
m_name = name;
}
|
|
|
|
|
I think there's nothing wrong in his method signature.
Why should he pass the string by value?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Yes, the old brain only working on one cylinder...confusing string with char*.
|
|
|
|
|
noticed when moving around the protected names...
protected:
string m_weight;
string m_name;
string m_gender;
the problem moves to gender. ect...
very very strange
|
|
|
|