|
|
Why don't you trace the code to find out what CAsyncSocket::Create does?
This is the easiest way of learning MFC .
Don't try it, just do it!
|
|
|
|
|
I need a good and smart way to pick a number and then make it "occupied". This is needed on 9 lines with 9 numbers from 1-9. I have a system allready with a class that makes a bool true when its occupied but there's some leak=/ because it's looped and must be applied on every line.
Does someone have a good general way to do this?
I'm trying to make a solver for this puzzle.
http://www.puzzle.jp/letsplay/applet/sd_sample_002-e.html[^]
|
|
|
|
|
One way might be:
int nNumbers[9][9] = {0};
...
while (1)
{
int nRow = rand() % 9;
int nCol = rand() % 9;
if (0 == nNumbers[nRow][nCol])
{
nNumbers[nRow][nCol] = 1;
break;
}
} There are several other approaches to this.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Thanks for answering but it's not really what I'm looking for.
You see, I have a class called Number.
I create a [9][9] array of it.
It is preset with 1-9 for every line:
for (int i = 0; i < 9; i++)
{
for (int j = 0; j < 9; j++)
{
myNumbers[i][j].setNumber(j + 1);
}
}
It is suppose to return a value:
//The puzzlecell is a class too.
//The random picked number for the line is put at the current position in the PuzzleCell which stores a value and will be presented in a Label when done.
myPuzzleCell[i][j].setTheValue(myNumbers[i][tempRand1].getNumber());
All this has to have the ability to preset and reset stuffs since I have all this in a huge loop which checks if the lines are good due to the Puzzle rules, which you can find at the page I linked previously. Please check the puzzle out so you get a hint.
Notice that I cannot only set random values and wish for it to be done in a century, I also have a system where I if a Line == 45 // (1+2+3+4+5+6+7+8+9) then save that line (by setting them to permanent true).
|
|
|
|
|
can any one tell me how to display a web page using MFC? just like we do in VB making use of the web controls...
regards,
Rookie
|
|
|
|
|
One way is to create an SDI application using a view derived from CHtmlView . Then you can use the Navigate() or Navigate2() methods to display the page.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Another way is to directly use a web browser control. See this[^] link.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Nice link Ravi.. thanks.. i cant believe how fast i'm getting help with codeproject..!
vivek
|
|
|
|
|
thanks david n ravi. the link is really resourceful.
learning,
Rookie
|
|
|
|
|
i just had similar doubt.. thankz rook
vivek
|
|
|
|
|
hi ppl,
I've been looking around for a while now, and I still can't find a simple, minimum & easy to use RSA implementation (and free of course). If know of such implementation, I'd appreciate some info
I need to be able to use the implementation in a shareware app, but only for my protection scheme, i.e. internal use. Further on, MFC or any other framework should not be used (so, plain Win32 API or STL are good )
I know this is a bit too specific, but if anyone knows anything, it would be a great help
---
YOU KNOW WHAT YOU ARE BLONDIE!?!? YOU'RE JUST A SON OF A BA A A A AAAAAAAAAA!!!!!
http://sprdsoft.cmar-net.org
http://t1tan.cjb.net
|
|
|
|
|
|
There is also a version from RSA laboratories... It is much smaller and easier to use... but I've forgotten the download link
Don't try it, just do it!
|
|
|
|
|
I've been digging through RSA labs site for a loooong time, and all I could find is a bunch of docs Is there another download location for RSA stuff??
thx
---
YOU KNOW WHAT YOU ARE BLONDIE!?!? YOU'RE JUST A SON OF A BA A A A AAAAAAAAAA!!!!!
http://sprdsoft.cmar-net.org
http://t1tan.cjb.net
|
|
|
|
|
yeeeees I've tried that, I couldn't get the thing working..
Anyways, since RSA is going to be a part of anti-crack-hack-slash protection, I think it would be unwise to use crypto++ since it's a separate module..could be easily avoided & my proggy would eventually get hacked (like that's not gonna happen anyway )
But I might take a closer look whatsoever, thanx
---
YOU KNOW WHAT YOU ARE BLONDIE!?!? YOU'RE JUST A SON OF A BA A A A AAAAAAAAAA!!!!!
http://sprdsoft.cmar-net.org
http://t1tan.cjb.net
|
|
|
|
|
|
That's what I was told by my boss in my last contract, when he was looking at some of my code that used it. His view was that he wouldn't touch it with a barge pole. Given that STL is a part of Standard C++ what do you guys think of such an attitude?
Kevin
|
|
|
|
|
Kevin McFarlane wrote:
what do you guys think of such an attitude?
Ignore it and move on.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Pretty much what I did. Also, I only worked on that paticular project for two or three weeks.
Kevin
|
|
|
|
|
Well, he is the boss, right? If he is ready to pay you for the extra hours you are going to spend because you can't use the Standard Library, it's all good and well. Your time is his money, right?
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
|
|
|
|
|
Nemanja Trifunovic wrote:
Well, he is the boss, right? If he is ready to pay you for the extra hours you are going to spend because you can't use the Standard Library, it's all good and well. Your time is his money, right?
And if they just use containers from MFC or another library instead of STL bloatware?
|
|
|
|
|
CP Visitor wrote:
And if they just use containers from MFC or another library
STL is more than just "containers", although I agree that using MFC containers is much better than raw arrays.
CP Visitor wrote:
STL bloatware
Just take some time and learn it - it is really useful, especially when enriched with Boost libraries. Although, I admit I hate its name conventions
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
|
|
|
|
|
Kevin McFarlane wrote:
Given that STL is a part of Standard C++ what do you guys think of such an attitude?
May be, He doesn't like STL at all
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|