|
What about using Lex and Yacc thing?
@!$h@
|
|
|
|
|
I don't know how to use those tools properly, but you could use them also.
The article that I pointed you to, has it's implementation based on mathematical expressions. After reading it, you should be able to write your own expression parser based on the same theory.
It doesn't matter wheter you want a mathematical expression parser or a regular expression parser, the idea of parsing is the same. Only the implementation is different.
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
Thanks
@!$h@
|
|
|
|
|
*please exuse any bad spelling i stink at that*
whene nameing a file useing
ofstream fp;
fp.open("C:\\cen\\name.DAT", ios::out);
is there a way to insert a vareuble here
fp.open("C:\\cen\\name-><-.DAT", ios::out);
so that you could have a loop that automatically created a difrent file each time with a difrent name based off the veriable
|
|
|
|
|
Yes, you just need to use strings. Example, if you are using MFC or the like:
ofstream fp;
CString someString;
int num = 4;
someString.Format("File%d.txt", num);
fp.open(someString, ios::out);
If you're using straight C++, it's a little tricker since you have to do all the string allocaiton and stuff, but can still be done easily:
char someString[1000];
int num = 4;
sprintf(someString, "File%d.txt", num);
fp.open(someString, ios::out);
...
In other words, CString::Format or sprintf are your friends. Look them up to see the various formatting codes and stuff.
No single raindrop believes that it is responsible for the flood.
|
|
|
|
|
thats grate the first one warked and i am vary gratefull but if you dont mind how would i set the file path with that format
|
|
|
|
|
never mind i may be an idiot but im not that bad i figured it out on my lonsume. thank you
|
|
|
|
|
Navin wrote:
If you're using straight C++, it's a little tricker since you have to do all the string allocaiton and stuff
That would be straight C , straight C++ would be a solution with the std::string.
;P;P
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
I have a DllGetVersion function that takes a pointer to
DLLVERSIONINFO. When I check the cbSize field, how do I
set the members if cbSize is sizeof(DLLVERSIONINFO2) struct?
Thank You
Bo Hunter
|
|
|
|
|
From the docs:dwFlags - Reserved.
ullVersion - Value that contains the version information. It is divided into four 16-bit fields containing the major and minor version numbers, the build number, and the QFE version, in that order. Use the
MAKEDLLVERULL macro to construct this value. The page on MAKEDLLVERULL has an example usage: MAKEDLLVERULL(4,71,0,0) which indicates version 4.71.0.0
--Mike--
Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"That probably would've sounded more commanding if I wasn't wearing my yummy sushi pajamas."
-- Buffy
|
|
|
|
|
Actually Michael I have read the same info.
I was wondering since my function took DLLVERSIONINFO*
struct and cbSize == sizeof(DLLVERSIONINFO2) how
would I set the new members. Put it this way, is this safe?
Or will it even work?
STDAPI DllGetVersion(DLLVERSIONINFO* pDllInfo)
{
pDllInfo->dwBuildNumber = BUILD_NUMBER;
pDllInfo->dwMajorVersion = MAJOR_NUMBER;
pDllInfo->dwMinorVersion = MINOR_NUMBER;
pDllInfo->dwPlatformID = PLATFORM_ID;
if (pDllInfo->cbSize == sizeof(DLLVERSIONINFO2))
{
DLLVERSIONINFO2* pDllInfo2 = (DLLVERSIONINFO2*)pDllInfo;
pDllInfo2->ullVersion = MAKEDLLVERULL(MAJOR_NUMBER,
MINOR_NUMBER,
BUILD_NUMBER,
DLL_SRVPACK);
}
return (S_OK);
}
Thank You
Bo Hunter
|
|
|
|
|
Can anyone tell me how to print text from and edit box using dcPrint?
Thankyou in advance.
|
|
|
|
|
|
hi
i making a program to make dial-up connection and connecting to the
net ,i dial with numbers stored in database , i use win API
like(InternetDial() ,InternetHangUp()), but i have two problems
1)InternetDial is dialing with default network connection on pc.
i need to make it taking numbers from database.?????
2) i want to create a new dial-up connection on pc, idont now what
function i can use
thank u for advanced help
send me on hz_csharp@hotmail.com
|
|
|
|
|
try to use rasdial from Dundas Software, its free and comes with source code !
|
|
|
|
|
I need quick help.
When i compile my code the compiler tell me that:
fatal error C1010: Unerwartetes Dateiende waehrend der Suche nach der Direktive fuer die vorkompilierte Header-Datei
I dont know what it does mean in englisch i think something with:
precompiled Header direktiv
How can I solve this problem ???
Sry for my bad english.
Send an mail as quick as you can at reddragon2kx@hotmail.com
|
|
|
|
|
You've probably got a cpp file without #include "stdafx.h" in it but with precompiled headers selected in the project settings.
Niall.
|
|
|
|
|
Thx. It works
|
|
|
|
|
|
Babelfish translated you compile message as: Unexpected file end during the search for the directive for the before-compiled header file.
Not bad )
It means that the file being compiled does not include 'stdafx.h' which is the pre-compiled header needed. You can either #include 'stdafx.h' at the top of the file, or change you compiling options for this file so that it does not use pre-compiled header.
Hope this helps,
Louis.
|
|
|
|
|
My app (if you play Freelancer, you've probably used it) has a function that takes up to 60 seconds to complete, and updates the current status using a CProgressCtrl. The problem is, sometimes after a little while (usually around half way) the progress control stops updating (even though I'm calling ProgressCtrl.RedrawWindow() every time), thus making the user think my app has stopped responding. Is there any way to get around that problem, without having to go through all the work and trouble of making a separate worker thread?
|
|
|
|
|
Yes, don't send as many messages to the control. I once had an app that read in a big database (like 50K records) and sent a msg after every record. It did exactly what you describe. Once I changed it to send a message every few hundred records, it worked perfectly.
--Mike--
Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber
Actual sign at the laundromat I go to: "No tinting or dying."
|
|
|
|
|
Thanks, that worked perfectly!
|
|
|
|
|
Hi! I have a list control that I only show when it has the focus. I have done this by having a button that displays the list, and then catch KillFocus on the list to hide it.
If I click on the button again (more of a switch) I want to hide the control. The problem is that the KillFocus event is handled first, so the button thinks the window is hidden so displays it again.
How can I tell which control is getting the focus when I am in my KillFocus event?
Cheers in advance,
Dom
|
|
|
|
|
blindcop wrote:
How can I tell which control is getting the focus when I am in my KillFocus event?
GetFocus() .
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|