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

Oh yes you just did start a flame war Mr. Mel (gotchya real name):twisted:

Shucks! cscgal must have tattled:eek:

Oh man, just when I thought it was the right time to jump right in the fight, you people stop fighting. Not fair. :mrgreen:

:mrgreen: :mrgreen: I would rather bail out still friends then win and gain enemies.

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

>>what do I NEED TO POST?
well, what have you tried? you already said you figured out what you need to do -- thats a good start. Now try putting that down on paper, schetch out on paper what you need to accomplish. Not code at this point, but just ideas. Don't get overwhelmed with the assignment -- take it one small step at a time.

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

Really ? Where did you read it....

The game sure rocks. Completed the game with a Necromancer. Ah..those times....*sigh*

There have been several rhumors about it, like this one.

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

I search and learn about what protostar is. Apparently it doesn't seem to be good. :eek: From what I know, we already had sun as our star. And if it were to happen someday, another star inside a star system is not good. At least that's what I know.

Thanks, quite a learning experience. :cheesy:

Naw -- it'd be ok. Just apply a little more sun screen cream and wear darker sun glasses. Might also have to pump up the air conditioner a little more. :)

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

Greatest game ever would have to be Diablo from Blizard. The last release sold over 1 million copies before it was released. And now Blizard is working on a third release, supposed to come out this year I think. I have been playing the game since its inception, about 10 years or so ago (1997). And since today is a holiday at my company I plan to play Diablo LOD again today so I can beat the bad monster for the million'th time.

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

link doesn't work or the server is turned off for the weekend.

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

Oops! Did I just start a flame war :eek: This isn't the place for it, so I won't respond any more.

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

dont' you need a camera to film you sitting at your computer playing a game?

Or do you mean a key logger program that just records all the keys you press on your keyboard. Such programs will just save them in a text or binary file -- not mp3 that you can play.

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

>>i am ne wto ruby on rails,plzz

what in the world does that mean :eek: :eek: Looks like half English and half Gibberish.

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

If it doesn't work the way you want it to, then just simply adjust the points until the lines are drawn correctly. Sometimes this will require trial-and-error method.

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

thanks for the help but I kind of figured that out already! The probelm im finding is in coding it. thanks just the same

you must post your code -- no one can help you if you do not.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
include<stdio.h>
int* new_last()
{
int a[10];
int i,j=0;
for(i=0;i<=5;i++)
{
a[i]=1+j;
//printf("%d\n",a[i]);
j++;
}
return(a);
}

C functions can not return arrays like that. They must be pointers and size allocated at runtime, like this:

include<stdio.h>
int* new_last()
{

int* a;
a = malloc(10 * sizeof(int));

int i,j=0;
for(i=0;i<=5;i++)
{
a[i]=1+j;
//printf("%d\n",a[i]);
j++;
}
return(a);
}

Now one problem is: can python deallocate the memory that was allocated by the c probram? If you put that code in a dll then the problem becomes even worse because memory allocated in a dll must normally be deallocated in the dll.

I think a better approach for you is to allocate the array in the python program and pass it to C for it to fill in. You won't have the memory allocation/deallocation problems described above.

include<stdio.h>
int* new_last(int array[10])
{
int i,j=0;
for(i=0;i<=5;i++)
{
a[i]=1+j;
//printf("%d\n",a[i]);
j++;
}
return(a);
}

Sorry, but I can not answer your other questions because I know next to nothing about python language. But I know there are others here who can help you.

Here is an article that discusses linking C functions with python. Hope it helps.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
CopyFile(´C:\\start.exe´, ´C:\\Program Files\\banana.exe´, [I]FALSE[/I]);

What about this?

what does your compiler say about it? Does it produce a warning or erro message?

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

Every version of MS-Windows is shipped with a free assembly language debugger. It's located in the c:\windows directory (or wherever you installed the operating system), and named debug.exe

This is a brief tutorial how to use it.

sergent commented: Nice! +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Here is a brief tutorial. It takes a bit of practice, but works.

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

Dam it! No it is not ok.
The 3d parameter is either TRUE or FALSE, which is an integer not a string.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
CopyFile("C:\\start.exe", "C:\\Program Files\\banana.exe", "f");

is this ok?

No. Did you read about that 3d parameter in the link Joe posted? If not, stop guessing and read it.

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

um...could you correct code

CopyFile("C:\\start.exe", "C:\\Program Files\\banana");

you can correct it yourself -- read the joe's post and MSDN. Pay attention to the third required parameter:!:

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

Right now im relearning VB6 as part of my college AS level Computing course, were being taught very well.

:eek: :eek: A college and university is supposed to teach you about moden skills. If you want to be an archologist and learn ancient laguages then learn VB6 But if you want to learn a skill that you can actually use on a job somewhere learn VB .NET. VB6 is only a toy nowdays for amiture programmers.

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

MS Word was only an example. COBOL IDEs can save it however they wish -- but of course plain text would be the most logical.

And there is, of course, the possibility that the OPs file has been corrupt beyond all recognition. That happened a lot in MS-DOS and Win95 operating systems.

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

I'm sure you all worked very hard to write those little programs but I think they are quite useless to anyone without lots of comments that explain what the programs are doing. No one is going to wade through all that uncommented code and try to figure it out for themselves; not worth the time and effort.

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

I have no clue either. What do you think is wrong? What is it supposed to do? As far as I know that is supposed to display all the letters of the Greek alphabet. You should always add comments in your code to explain what it is doing.

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

I'm not a pascal prpgrammer so I can't write the program for you, but it will be the same in any language.

First create three string objects called month, day and year then use substring (or something similar) that will extract the appropriate digits from the original string into each of the three objects. Next convert each of the three sub strings into integers. Finally check that the month is between 1 and 12, the day is between 1 and last day of the month.

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

If you expect anyone to help you:

(1) you need to comment the hell out of your code, put comments on nearly every line and at the beginning of each section telling what it is supposed to do. I'm not going to try to figure it out and just "guess" at it, and I doubt your instructor will either.

(2) post most recent code -- its sort of difficult for me to see it on your computer :)

Get yourself a debugger so that you can see what the program is doing one line at a time. Every version of MS operating systems is shipped with an assembler debugger called debug.exe located in c:\windows directory. There are better ones on the net, but will do in a pinch.

Read through some of the links in the new Sticky to this board.

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

In order to use MS Access or any other SQL database you need to learn the SQL language -- or at least have a basic understanding of it. There are several free c++ ODBC classes and here that will simplify connecting to the database, quering and receiving the resultsets. You can also do database inserts and updates.

Most, if not all, the c++ classes contain example programs.

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

I realize you put in a lot of time and effort writing/testing the program and you are probably hoping to make billions of dollars with it, but I think you might want to sell it as a shareware program and include the source code if someone actually registers the program with you and pays you for the program, typically $25.00 or so.

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

not all editors save files as text files -- some, like MS Word, will save internal formatting data which will look like just in Notepad.

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

>>cmp al,51h ; ESC pressed?
ESC is not 51h -- its 1BH (27 decimal) you should be using an ascii chart

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

what are the errors?

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

maybe this will help you

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

link works for me -- but it was too boring to watch all of it so I stopped after a minute or so.

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

appears to be a file format for some COBOL IDE. you might try downloading some of the free cobol editors and see if any of them can read the file.

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

I don't think there is any one specific way to limit a program to a single instance. Some use a registry entry to determine if there is an instance already running, while others use a file or create a system-wide semaphore (see MSDN for CreateSemaphore() win32 api function)

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

see this thred for example. It is specific to 16-bit MS-DOS 6.X and earlier. Can't run it in 32-bit applications because int 21 instruction not allowed unless running in ring 0 as super user (os)

MOV AH,4CH ; return control to DOS
INT 21H
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

this problem already solved by my friend. thanks for your help...

:)

Great News -- glad you found someone that could help you :)

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

There was a movie about a major earth quake in california that moved LA into an island. Funny scene -- all the lights remained on in that city even though electricity was obviously cut off from the mainland.

I should have kept my property in Tucson as it might be beach front property some day.

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

what compiler and operating system? We can't tell you where to put that code because you didn't post enough code. Sorta difficult to see your program from where I'm setting :)

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

>>Can you spot the undefined behavior that is described there
I give up -- what is it??

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

not sure if the week numbers are correct or not. The days are ok

This program calculates the weeknday, the first days in the year, the weeknday
n the month2 of the years, the week, with which the month2 starts
The week with that of the month2 finishes and the number of the weeks in the mo
th2.
please, enter the year and the month in which the above-mentioned data should b
 shown,
finally the calender will come out with month and days

please enter a year : 2000
please enter a month: 1
that date is valid
the fisrt day of a year 2000is a: Sa
 the fisrt day of that month is on: 52calendar week
the fisrt day of that month is: Sa
the number of that week is: 6
the week in the month2 end in this week: 57


We | 52 53  1  2  3  4
-----------------------------
Mo |     3 10 17 24 31
Tue |     4 11 18 25
Wed |     5 12 19 26
Thu |     6 13 20 27
Fr |     7 14 21 28
Sa |  1  8 15 22 29
So |  2  9 16 23 30
Press any key to continue . . .
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Jan 1954 -- Only the week numbers are incorrect, days are ok.

Dec 1953 -- everything looks ok

please give a year : 1953
please give a month: 12
that date is valid
the fisrt day of a year 1953is a: Thu1953
28

 the fisrt day of that month is on: 49calendar week
1953
28
the fisrt day of that month is: Tue
the number of that week is: 5
the week in the month2 end in this week: 53


We | 49 50 51 52 53
-------------------------
Mo |     7 14 21 28
Tue |  1  8 15 22 29
Wed |  2  9 16 23 30
Thu |  3 10 17 24 31
Fr |  4 11 18 25
Sa |  5 12 19 26
So |  6 13 20 27
Press any key to continue . . .
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

The actual code that implements the functions in stadnard libary are compiler-dependent -- the standards do not dictate how the functions are implemented, only what the functions should do. So one compiler might implement the functions differently then another compiler. You can get the source code for all compiler functions from GNU, which is open-source and free. But be prepared for some really nasty ( :) ) reading!

Some of the functions, like strlen() are pretty simple. Others, like printf() family of functions, get pretty complicated and difficult for newbes to follow. So I'm not sure how useful the source code would be to you at your level of understanding. Many, if not most, of the functions in the C standard library were written over 20 years ago and tested in thousands, if not millions, of programs. So you can be well assured that they work correctly as designed and documented. This doesn't mean they are good functions to use, just that they work ok.

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

we need more laughter in this world -- too much bad news nowdays.

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

Shucks! I tought it would be about kalifornia falling off into the ocean :(

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

The problem with reading the standard itself is that the standard is written mostly for designers/writers of compilers. New programmer students will probably find it not-too-useful. I would rather read one of the many books you can buy or free e-books, which are written for people actually writing the programs.

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

I haven't had time to look at it today, but since I can not read a word of German I am probably not the best person to even try. I don't know if anyone else here read/write German or not. Or if you could translate the program into English ... :)

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

I marked this thread Solved for you. Glad you found the solution. :)

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

Looks like COBOL. Don't know of any other programming languages that use that key word, but then I don't know them all either. If you have a COBOL program then it should be quite obvious from other syntex -- COBOL programs have a very distinctive grammer.

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

Shouldn't you be using strcmp instead of == for comparing strings?

depends on how VideoFormat is declared.

>> VideoFormat = FormatTypeComboBox->Text();
Is this MS-Windows combo box? or something else, such as *nix? what compiler and os are you using?

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

there are several examples here if you use Microsoft compilers.

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

>>Our translations are sad,and it is not rare that code is wrong in books.
It is not your translator -- our books have those mistakes too.

>>most of the good books are not for free
One reason people write books is to make money, and they can not do that if they give their work away for free.

>>My knowlege is enough for undrestanding it and read it.
you do that very well, better than many native english-speaking people.