I have written a chatterbot in C++,basicaly what i want to know is that if there is anyway that i could manage to put it on my website to make it available for a direct conversation with the visitors. Do i really have to rewrite the entire code in a scripting language like JavaScript or is there...
> I have a char, which is a mixture of numbers and letters - something like 23H9.
i think that you meant a string.
one possible way for the declare it,would be.
char *str = "23H9";
> How can I obtain from it the letter (in my exemple H).
i'm not sure if i really understand what you meant...
I have created a very basic MFC Application but when i run it, it use 100% of my CPU resources. Here is the code:
#include <afxwin.h>
class CDrawingApp : public CWinApp {
public:
virtual BOOL InitInstance();
CDrawingApp() {};
};
class CMainFrame : public CFrameWnd {
public:
CMainFrame() {...
oops,sorry i didn't read your post completely,i have miss the part with "VisualSudio 2003",but anyway i have compiled the code sample with "Visual Studion 2005 Beta"
and it works,which means that you shouldn't have any problem for using the "map" functions in "VisualStudio 2003",anyway that's...
depending of what you want to do,you could try something like:
#include <map>
#include <string>
using std::map;
....
....
map< string, int > myMap;
//now,you can do what ever operation you want with "myMap"
// here is an example:
myMap["Mercury"] = 1;
myMap["Venus"] = 2;
myMap["Earth"] = 3...
> BOOL should be used only for something that is true or false, not a number.
hmm,yes i know. Actualy,the variable "m_nNum" that i have use on the code sample only takes two values 0 and 1. Altought i have choose a name that might let you think that i'm treating this variable as an integer...
Is it possible to modify the value of a variable declared in a class by calling an object created outside that class?
here is an example:
class CMyClass {
public:
CMyClass() { m_nNum = 0; }
void OnPaint();
void Draw();
BOOL m_nNum;
...
..
};
.....
#include "myclass.h"
.....
void...
> Store a pointer to the main class in each of the two dialogs, then just call whatever methods you need to update it from those dialogs.
How do i do this? I mean i have two class, "CDrawerApp" and "CDialogClass". "CDrawerApp" is the class where i have the code to draw the polygons...
I have created an MFC application for drawing poligons,i have a window which is the main window for the program,i use this window to display the image of the poligons. ( i have created a class to handle the routines for the main window) But before to start drawing a polygon, i use 2 Dialog Boxes...
any body can tell me what is a thesaurus active x component? I mean,i understand a littlebit what the term active x component means but i dont think i understand the word thesaurus.
*********************************************************
> Does anyone have a working example of n-way b-tree written in vc++ 6.0?
Did you meant an n-ary tree,if so,check this link,it might be quite
useful:http://www.damtp.cam.ac.uk/user/kp229/tree/
What is the proper syntaxe for declaring a function that takes another function as parameter?
i think that i know how to do it in C but i can't figure it out in C++. The reason why i'm asking this is because
my functions are declared in a class.(ex: class MyClas)
i'm not sure it is what you are looking for,but you might try something like this:
#include <ctype.h>
.....
..
bool checkString( char *str )
{
if( !isalpha(str[0]) || !isalpha(str[1]))
{
return false;
}
for( int i = 2; str[i] != 0; i++ )
{
if(!isdigit(str[i]))...
Thanks for that, i didn't recognize my decalration to byte, since i was thinking that the control register has 5 bits and each one could take 2 values either 0 or 1 so i thought the range of values would be between 0 and 32 (00000-11111).
so could you tell me how i could make the control...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.