|
Well, I haven't actually tried to validate your code yet, but it looks like you are trying to listen on port 420100 on the server app (which is out of the range of acceptable ports, it's over 65535), and the client is trying to connect to port 20100. You need to connect to the port that's being listened on. I'm assuming it's just a typeo in your code that you put 420100 instead of 20100 on the server side.
-- Rocky Dean Pulley
|
|
|
|
|
He, he. What a dumb mistake by me. But I still get the same problem. I cannot get the two to connect, even now that I am listening and connecting using the same port. Oh, I used Dev-C++ for compiling if you wanted to give it a go.
|
|
|
|
|
i need a way that i can search the harddrive for a paticular file type
|
|
|
|
|
use findfirstfile() and findnextfile() to search for a file. But this requires drive letters.
To get the drive letters at the runtime use GetLogicalDriveStrings/ GetLogicalDrives.
suhredayan There is no spoon.
|
|
|
|
|
I am using some code that is generated by a compiler generator (ANTLR[^]) and the generated code has a number of places wher it uses #line. I notice that I can comment this out and it still compiles/builds/runs. Why would anyone want to use #line ?
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
|
|
|
|
|
For macros and inline includes, it is real handy. By using #Line, you can reference the line of the include file, rather than the source file that the macro has been inserted into.
onwards and upwards...
|
|
|
|
|
#line tells the compiler/preprocessor that the next line in the source file should be treated as though it came from another file/line. In the case of antlr (and lex and yacc and other compiler compilers) they use #line wherever they copy code from your source file into the output file, in the case of the rule actions. This is so if there is an error in your code, the compiler will indicate where in your source file the error was, rather than the line in the generated file, which probably means nothing to you.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Is there a way to debug another process, that the process I'm debugging has done a CreateProcess() call for. I can't figure out how to load the project for the other process into the workspace for the project that I'm debugging. I'm using version 6 of Visual Studio. Thanks.
Chris Meech
I am Canadian. [heard in a local bar]
Gently arching his fishing rod back he moves the tip forward in a gentle arch releasing the line.... kersplunk [Doug Goulden]
Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]
|
|
|
|
|
|
Thanks Chris.
Chris Meech
I am Canadian. [heard in a local bar]
Gently arching his fishing rod back he moves the tip forward in a gentle arch releasing the line.... kersplunk [Doug Goulden]
Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]
|
|
|
|
|
A lot of people know class CHtmlView. I had found pretty functions
FIndText() and FindText2(), written by Marc Richarme (http://www.codeproject.com/miscctrl/CHtmlView_Search/CHtmlView_Search_demo.zip),
that allow to find text on loaded(!) web-page.
Now I'm making project. One of main its functions is finding text on several(!) pages.
I do not know any other way to do it excepting using function FindText2() ( or FindText() ).
Actually, it is possible to find text in several web-pages, using, for example, FindText2() for every page separately.
But this function can't be applied until web-document isn't loaded.
So, I decided to organize cycle. Each page will be loaded in every other cycle.
I mean something like this (in abstraction):
<br />
<br />
for (int i=0; i<number_of_pages; i++)<br />
{<br />
...<br />
this->Navigate2( _urls[i], NULL, NULL );
....<br />
...<br />
}<br />
<br />
My problem is concluded in follow: the FindText2() function in my code called every time before new web-page will be loaded
completely. That's why FindText2() works with old page-url, finding text on it
Having poor English level, I repeat: FindText2() forestalls loading page.
So, I would like to know have can I define when my page is loaded, and then I'll call for FindText2().
Thanks in advance, I tried to explaine my problem very exactly.
|
|
|
|
|
|
I'v just tried. But have no success.
I decided to search for text using direct reading from file. Maybe you know, is there any class to organize searching in *.txt file for concrete text?
Thank you for answering
|
|
|
|
|
I have a constants.h file that I would like to use to store constants and such.
When I include the file in a class in my project I keep getting Link Error:2005: "already defined in" errors when I try to declare a string constant in the constant.h file.
How do I create global string constants that I can use througout my app?
// constants.h: defines constants to be used througout application.
//
//////////////////////////////////////////////////////////////////////
#if !defined(APP_CONSTANTS_0209051212)
#define APP_CONSTANTS_0209051212
//no problems here
const APP_PATH_STRING_LENGTH = 255;
//link errors when using these
char* app_data_path = "data\\";
char* app_charts_path = "c:\\CHARTS\\";
#endif // !defined(APP_CONSTANTS_0209051212)
Kevin Shaffer
kshaff03@msn.com
|
|
|
|
|
I made the strings static, which appears to have solved my problem. Is this the best way to handled such a problem?
char* app_data_path = "data\\";
char* app_charts_path = "c:\\CHARTS\\";
to:
static char* app_data_path = "data\\";
static char* app_charts_path = "c:\\CHARTS\\";
Kevin Shaffer
kshaff03@msn.com
|
|
|
|
|
kshaff03 wrote:
Is this the best way to handled such a problem?
nope.
the best way is like this:
foo.cpp:
#include "foo.h"
const char* app_data_path = "data\\";
const char* app_charts_path = "c:\\CHARTS\\";
foo.h
extern const char* app_data_path;
extern const char* app_charts_path;
making them static just means that every .CPP will get its own private copy of the strings.
Image Toolkits | Image Processing | Cleek
|
|
|
|
|
Thanks Chris,
As usual, your the best.
-Kevin
Kevin Shaffer
kshaff03@msn.com
|
|
|
|
|
I am using Microsoft Visual C++ 6.0 and i need to execute a program (Ctrl+F5) passing it same arguments (as command line arguments), where can i put the arguments ?
Thanks.
|
|
|
|
|
You can pass any command line arguments to your program in the projects settings, under the Debug tab, in the Program arguments edit box.
I Dream of Absolute Zero
|
|
|
|
|
It will use the same arguments that you setup in the project settings.
Project->Settings->Debug
Program arguments field
NOTE: This is the same path for both release and debug builds
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
|
How to program proxy chains software?
Love is the law, love under will.
|
|
|
|
|
can any1 help me?
Love is the law, love under will.
|
|
|
|
|
I'm a "seasoned" SQL, SQR, COBOL, Easytrieve programmer teaching myself Win32 programming.
I'm creating a Wheel of Fortune type game using a dialog box. I've got the alphabet across the top of the screen, I can accept a letter choice and blank it out if it's not in the puzzle.
But here is the problem...can I use a dialog box to put random EDITTEXT boxes on a page that represent the puzzle?
For Example: PUZZLE 1 ___ ___ ___
___ ___ ___
PUZZLE 2 ___ ___ ___ ___ ___
Don't know how my resource script file can handle a random number of EDITTEXT boxes? I'm just trying this to get a feel for message based programming. Is a dialog box the wrong approach?
Thanks,
dC
|
|
|
|
|
Dialog box is probably okay for a learning program such as this.
You can CreatWindow on the fly and generate the edit boxes.
There is typically (or used to be) limit of 255 controls in one window.
I don't suppose you need that many, though, for your game.
You can create them in the desired lcoation, or use MoveWindow to position them.
If you make a dialog reosurce template, you could use ShowWindow and EnableWindow to show/hide enable/disable the ones your puzzle does not need at the time.
|
|
|
|