Click here to Skip to main content
15,886,919 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionMemory mapped file I/O Vs Disk I/O Pin
vipin_nvk23-Sep-09 18:05
vipin_nvk23-Sep-09 18:05 
AnswerRe: Memory mapped file I/O Vs Disk I/O Pin
Stuart Dootson24-Sep-09 6:23
professionalStuart Dootson24-Sep-09 6:23 
Questiona bother about windows service Pin
jinjiashan23-Sep-09 16:16
jinjiashan23-Sep-09 16:16 
AnswerRe: a bother about windows service Pin
jinjiashan23-Sep-09 21:50
jinjiashan23-Sep-09 21:50 
GeneralRe: a bother about windows service Pin
jinjiashan24-Sep-09 0:04
jinjiashan24-Sep-09 0:04 
AnswerRe: a bother about windows service Pin
Rolf Kristensen26-Sep-09 7:49
Rolf Kristensen26-Sep-09 7:49 
GeneralRe: a bother about windows service Pin
jinjiashan27-Sep-09 13:29
jinjiashan27-Sep-09 13:29 
QuestionProblem with initializing Main args! Pin
Largo6523-Sep-09 12:58
Largo6523-Sep-09 12:58 
Hi, I am building an application using the OGRE 3D engine and Rebecca API for AIML. The problem is when creating a NetworkAimlFacade object. Its constructors need the "int argc, char* args[]" that are normally in the main method. But I'm not using any main method and I am building an independent class based on a sample console application:

Here is my class:

class ChatBot
{
	private:
	
		NetworkGraphBuilder* builder;
	
	public:
		ChatBot(){

			NetworkAimlFacade aiml(argc, args); // Where can I get these vars?
			NetworkGraphBuilder &builder = aiml.getNetworkGraphBuilder();
			string botName = builder.getBotPredicate("name").c_str();
			StringPimpl response = builder.getResponse("connect");		

	}
		string askQuestionAndGetAnswer( string input )
		{
			StringPimpl strPimText;
			builder->getResponse(strPimText);
			string responseString = strPimText.c_str();
			return (responseString);
		}
};


Here is part of the console sample:

int main (int argc, char* args[]) 
{
		/*
		 * This is responsible for memory management of 
		 * GraphBuilder.
		 */
		NetworkAimlFacade aiml(argc, args);


Can anyone tell me if it is possible to initialize the "argc" and "args" variables with out the main method? (I've tried a couple of ways but they don't work Frown | :(
AnswerRe: Problem with initializing Main args! Pin
Game-point23-Sep-09 18:40
Game-point23-Sep-09 18:40 
AnswerRe: Problem with initializing Main args! Pin
Saurabh.Garg23-Sep-09 18:56
Saurabh.Garg23-Sep-09 18:56 
AnswerRe: Problem with initializing Main args! Pin
«_Superman_»23-Sep-09 19:23
professional«_Superman_»23-Sep-09 19:23 
AnswerRe: Problem with initializing Main args! Pin
Richard MacCutchan23-Sep-09 22:32
mveRichard MacCutchan23-Sep-09 22:32 
QuestionC++ with in-code Assembly Pin
paolosh23-Sep-09 10:22
paolosh23-Sep-09 10:22 
AnswerRe: C++ with in-code Assembly Pin
ied23-Sep-09 10:28
ied23-Sep-09 10:28 
AnswerRe: C++ with in-code Assembly Pin
Rick York23-Sep-09 10:37
mveRick York23-Sep-09 10:37 
QuestionLoadImage fails to locate file Pin
raich23-Sep-09 8:32
raich23-Sep-09 8:32 
QuestionRe: LoadImage fails to locate file Pin
David Crow23-Sep-09 9:03
David Crow23-Sep-09 9:03 
AnswerRe: LoadImage fails to locate file Pin
raich23-Sep-09 9:42
raich23-Sep-09 9:42 
QuestionRe: LoadImage fails to locate file Pin
David Crow23-Sep-09 10:00
David Crow23-Sep-09 10:00 
AnswerRe: LoadImage fails to locate file Pin
norish23-Sep-09 21:43
norish23-Sep-09 21:43 
AnswerRe: LoadImage fails to locate file Pin
ied23-Sep-09 9:56
ied23-Sep-09 9:56 
GeneralRe: LoadImage fails to locate file Pin
raich23-Sep-09 10:02
raich23-Sep-09 10:02 
AnswerRe: LoadImage fails to locate file Pin
CPallini23-Sep-09 10:02
mveCPallini23-Sep-09 10:02 
QuestionOverriding void AFXAPI SerializeElements [modified] Pin
al250023-Sep-09 7:22
al250023-Sep-09 7:22 
AnswerRe: Overriding void AFXAPI SerializeElements [modified] Pin
al250023-Sep-09 10:24
al250023-Sep-09 10:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.