Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

MS-Windows, use these console functions. First, get the handle to the consol window with GetConsoleWindow() then move the cursor to desired location with SetConsoleCursorPosition().

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Tyler: that would be horribly inefficient. Windows message contains the ID to the combo box that was changed.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

you gave each combobox a unique id when you created it. Just use it.

what version of vc++ are you using?

There are a lot of combo box messages See this MSDN article

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

i need the full edition as i have XP home and dont want to upgrade to a sucky version

you already use a sucky version so upgrading to another sucky version should not be a problem. But I agree the basic version is probably not adequate for software development.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

why would you want to think about buying the ultimate edition for home use, unless of course you have a huge network server at home.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Anyone aware of ways in which I can go about beginning, and which should I start out with bearing in mind I am doing this on my own, Any suggestions?

For starters you can read this thread

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Getting the list of files from a directory is not too difficult but is os-dependent. In C there is no portable way to do it. In C++ boost libraries have portable functions.

these code snippets show how to do it in both linux and ms-windows.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

what version of gcc do you have? The program looks ok to me. Maybe you need to upgrade to Fedora 6 which will also upgrade your compiler.

>>undefined reference
that usually means you need to specify the c++ libraries on the command line.

gcc test.cpp lib<archive name here>.a -o test
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

The maximum limit for globals in any program should be ZERO.
Globals are evil and should not generally be used.

In 16-bit C programs it is often necessary to use globals because of the limited available stack space and Vishesh is not allowed to use pointers. I used to just put global data into its own *.c file and use as many *.c files as necessary.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

bad link -- either fix the link or post the code. My guess is that you either used an old header file or no header file at all. should be <iostream>, not <iostream.h> (doesn't have a .h extension)

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Really enjoyed Chand Sifarish music video -- just shows that love songs is an international language of its own :) Couldn't understand the lyrics but the music was fantastic, loved the mixture of western and eastern harmonies.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Every version of MS-Windows has come with a free disassembler -- its called debug.exe and located in c:\windows directory (or whereever you installed windows).

Here are a couple very basic commands

c:\debug myprogram.exe
// disassemble the program
>u <Enter>
// get help
>h <Enter>
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Old borland compilers starting with Turbo C had that problem -- its 16-bit compiler will not allow more than 64K worth of data in any one *.c or *.cpp file. If you need more global data than that you have to split it up into two or more files.

SpS commented: :) ~~ SpS +3
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Herehttp://www.cs.tut.fi/~jkorpela/forms/cgic.html is one of probably many tutorials. stdout is treated in a special way in a web server, which redirects it back to the web browser. I don't know enough of the details to tell you much more -- just google for "cgi c programs" and you will get more information.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

my guess is the computer that runs the cgi program does not have .NET framefork installed or the wrong version. Use either fprintf() or cout and you won't have that problem.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Yeah, did my research already but still insuffient. Any result guys??
So far, i can open it with Coral Draw X3 which is not good enough for me...

So sorry -- Coral Draw invented it and the file format belongs to them. If they choose to make it public domain then so be it. Otherwise you'll have to just use their products to view their files. Coral Draw is in business to make money, just like most of us are -- they aren't about to give it away if they don't have to.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Awesomely efficient code you got there! Very sleek.

and its so well documented too!:eek: assembly code should have comments on nearly every line.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

you probably can not do the because the program is more than likely burned into a ROM (Read-Only Memory) chip on the card. Either buy a new 64-bit video card or run the 32-bit card on your 64-bit computer. That's what I do and don't have a problem.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

There are a few articles about mixing c and assembly. Not very difficult to do, but the techniques may be a bit different from one c compiler to another due to c calling convention and how the c compiler modified function names. For example microsoft compiler add an underline before the function name while borland compilers typically add it after the function name. other compilers may not change the function names at all.

And then you have the problem is how to pass parameters to the function. Here again you have to know the calling convention used by the c compiler. If it is __stdcall parameters are pushed differently than __fortran or __fastcall calling conventions.

Here is a short article that might help you. If you google for "mixed c and assembly language programming" you will get more help.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

If you cut off both ends, the string is endless. So there! :p

I'm freyed not.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Oh Cool!:) :) I just saw the new format for the first time. Looks great -- I thought the previous format looked a little cluttered.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

have you tried this plugin for your browser

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

>>enterance papers

What are these? You mean students in India have to take a test in order to advance to the next grade ?:eek: And why would you want the solutions to some previous year's test? I would think you would want the solution to the next year's test. This is realllly confusing:confused: :confused: :confused:

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

oops! just ignore my dumb post. I see that is a corel draw file, not a card file.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

does that mean variables level1, level2, ... level200, levelXXX ? create an array or vector of those structures. Maybe something like this:

struct subject
{
     string subjectName;
     string data1;
     string data2;
     string data3;
} ;
// array of structures
vector<subject> levels;

void SubjectData::processMessage(
const bha::sessionLayer::SubjectData& event, TibMsg& msg) {

subject oneSubject;

if (msg.Get("CODE1", field) == TIBMSG_OK) {
    field.Convert(buffer, TIB_BUFFER_SIZE);
    buffer[field.Size()] = 0;
    oneSubject.subjectName = buffer;
}

if (msg.Get("DATA1", field) == TIBMSG_OK) {
   field.Convert(buffer, TIB_BUFFER_SIZE);
   buffer[field.Size()] = 0;
   oneSubject.data1 = buffer;
}

if (msg.Get("DATA2", field) == TIBMSG_OK) {
   field.Convert(buffer, TIB_BUFFER_SIZE);
   buffer[field.Size()] = 0;
   oneSubject.data2 = buffer;
}
 

if (msg.Get("DATA3", field) == TIBMSG_OK) {
   field.Convert(buffer, TIB_BUFFER_SIZE);
   buffer[field.Size()] = 0;
   oneSubject.data3 = buffer;
}
// add the struct to the vector
levels.push_back(oneSubject); 
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

how about this

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I'm not sure if this will work, but if there are spaces in the path then you will have to put it in a directory that does not have spaces. old MS-DOS programs do not recognize long filenames or path names either.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

win32 api function GetSystemTime() ???

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Is it possible? Because I want to convert my Mario by Utter Chaos into Java to put on my website.

Of course its possible. Just rewrite the application in Java. (don't ask me how because I don't know either).

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

>>What is the size of a double?
depends on operating system and possibly the compiler. But you can use sizeof(double) to get its size.

>>How long is a piece of string?
depends on where you cut it with your scissors. (sorry for the bad joke, I just couldn't resistet temptation :eek: )

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

>> buffer[field.Size()] = 0;
this C string technique is unnecessary when using std::string objects (assuming buffer is std::string). And it might actually cause data corruption if the amount of allocated space is not enough for that character.

>> if ( code = "SUB1" )
you probably intend to use the boolean operator ==, not the assignment operator.

I don't know if the following will answer your question, but this is another way to code that function. You really should get rid of those global variables and use class properties instead. That way you can get a separate set of those structures for every instance of SubjectData class.

void SubjectData::processMessage(
const bha::sessionLayer::SubjectData& event, TibMsg& msg) {

 subject* sptr = 0;

if (msg.Get("CODE1", field) == TIBMSG_OK) {
    field.Convert(buffer, TIB_BUFFER_SIZE);
    buffer[field.Size()] = 0;
    code = buffer;
    if(code == "SUB1") 
        sptr = &level1;
    else if(code == "SUB2")
        sptr = &level2;
    else if(code == "SUB3")
        sptr = &level3;
    else
        sptr = 0; // error
    found = true;
}
<snip>

if (found == true && sptr != 0)
{
    sptr->data1 = data1;
    sptr->data2 = data2;
    sptr->data3 = data3;
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

click on the link and read it.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I have never seen that problem.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

see int 21, function 5700 and 5701. to get current date/time

Once you get that, then learn how to convert the data in the registers to human readable form. If you read some of the other threads here there are example of how to do that.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Some of the public APIs are legacy APIs written using C. Most modern ones are C++ (or a mix of C++ and C)..

That simply is not possible because other languages can not call c++ functions due to function mangling, c++ classes etc. Here I am talking about win32 api functions only. As I've stated twice before these functions might be wrappers for some c++ code, but that is wholely internal to them. The functions could be calling cobol and aida code for all we know and care.

If you write a c++ function and surround it with "external C" the function becomes a C function, not c++.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

True, but you learn nothing about how to parse a string, which I would assume is the lesson to be learned here.

we don't know that because he didn't say what the purpose of the lesson is. It could be just to learn file i/o.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

What I meant was that since these names were written on the page titled "Softwares made in C++" , he must have obvioulsy implied that C++ was used to make WinXP.

Since there are many more parts to the OS than the win32 api that makes a lot of sense. :)

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

>>so he obviously must have meant C++ when he said Visual C++.

I disagree. He was talking about the compiler, not the language. You don't build a program with a computer language, but with a compiler. Such an educated person would not write such an ambiguous sentence.
>>everything at Microsoft is built using ...

The win32 api functions are what is called from DLLs and application programs. They may well be wrappers for some c++ code but that is all internal to the api and not normally accessible outside the api.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

*Ahem*

The quote means that Microsoft used their own compiler to create the os (of course they didn't use Borland's compiler) . win32 api was written in C, not C++. Could not be c++ because c++ can not be called by other languages. Of course the internals of those functions could have been written in any language, but what I have seen of those functions they were not.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

the most widely used application written (largely) in C++ is Windows XP.

None of the MS-Windows win32 api was written in c++. But some of the other programs and make up the OS may have been, I don't know.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Well that's one of the most ridiculous things I've ever heard.

Regards Niek

Oh? show me someone who hasn't died of something:cheesy:

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

please read this thread

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Not making fun of it at all... Luckily I've never had friends or family develop cancer but I'd not wish it on anyone (and we have had our share of cancer scares in the family when initial diagnoses said it "might" be cancer).

my father died of lung cancer from smoking. It isn't a pretty sight and a long terrible death. People often say "you gotta die of something" -- but there are better ways to die.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

some programs were written with more than one language. Now emerging are .NET programs which may be a combination of c++, VB and C#.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

fscanf() will read just one word at a time, which will greatly simplify the solution to the problem.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster


Then how do you check if the file was read correctly, i.e. if all the numbers were read correctly or not?

fin will fail and return null if it encounters an error or on end-of-file.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

How about BoundsChecker

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I will buy it in about a year. By then M$ will have at least one service pack out for it.