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

Below is the output of the three compilers I use.

This is Dev-C++

value of var init without round brackets : 0
value of var init with round brackets : 0

M$ VC++ 6.0

value of var init without round brackets : -842150451
value of var init with round brackets : -842150451
Press any key to continue

VC++ 2005 Pro

value of var init without round brackets : -842150451
value of var init with round brackets : 0
Press any key to continue . . .
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

you example produces the same output when compiled with my compiler.

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

That is syntax error. Are you trying to code a new function? There are other syntax errors too that you need to correct. The compiler will tell you what lines the errors are on.

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

what are the error messages? please post only the first two or three, not all one million of them .

And thank you for using code tags :cheesy:

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

they are the same -- the first form is normally used to pass parameters to the class constructor. The second form when there are no parameters to pass.

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

Hi this is Shiva..

I saw the snap shots of your application..

Can i have the piece of code to create the tabcontrol(and adding button,labrls to it) and datagrid..

Now i am developing Sample Library management Project using Win32 using Dev c++ compiler..

I really need of Datagrid to display book details and also need Tab control ..

Please send me the way to do this ..please send some simple tutorials..


Thanks in advance..

Please see the link I posted in your other thread.

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

Thank you very much, it works!!!
Sorry for the trivial question but it is not easy to find documentation on dialog window based application....
Thank you again!

In windows programming there is no such thing as a trival question:cheesy:

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

Mel, Kiss my grits! :mrgreen:

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

I think Iron Maiden needs to be locked up in the loonybin and in a straight jacket. Or he needs to get cleaned off those drugs.

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

first you need to get the mathametical formulas for those. toupper() and tolower() has nothing to do with that. Once you know that you can start writing the program. Nobody here is going to do that work for you, so post some code and ask all the questions you need about the program YOU write.

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

And you need to add setupapi.lib to the project

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

in the button's event handler call GetSaveFileName()

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

Here is a c++ example. If you want C then just port it.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
while(m_iCount <= 5)
	{
         }

How many ways can you say infinite loop ? and it is consuming nearly all CPU time?

why are you making it so difficult ? If you goal is for the program to pause for 5 second, just call Sleep() function. No need for that timer.

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

I have asked a mod to move this thread to Tech Talk since I think that is a more appropriate place. Thanks for all your help, even though my computer still can not play that file without corrupting the operating system.

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

Chaky: here are my DLL versions. The first group all are older versions than the ones you posted.

qasf.dll -- v9.0.0.3250
wmvdmod.dll -- v9.0.0.3250
wmadmod.dll -- v9.0.0.3250
quartz.dll -- v6.5.2600.2749

huffyuv.dll -- do not nave
iyuv_32.dll -- v5.1.2600.2180
msyuv.dll -- v5.3.2600.2180
tsbyuv.dll -- v5.1.2600.0

>>Also look if you have any YUV codec
Nothing like that in c:\windows or subs. I searched for *YV* and *YUV* and only came up w5ith some of the dlls mentioned previously.

I started Windows Media Player to see what version I have. Then I got an Update notice, so am installing it now.

[edit]Installing newest version did not help. Same behavior as before[/edit]

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

most likely your computer has a bad memory chip. you might use a memory diagnostics program to see if you need to replace the memory chips.

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

you can't do that with any programming language. The best you can hope for is for a disassembler to produce assembly language.

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

there aren't any. go to normal college or university.

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

what os, how much ram, how big hd ? And you should have posted in Tech Talk board.

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

>>No you cant do this.
you can if you treat the 1d array as a 2d array. If you want column 0 of row 1, where row = desired row number (1), columns = number of columns per row, and col = desired column number (0)

array[ row * columns + col] = 1;

Actually, in C++ I would use a vector of vectors instead of a C-style array, but I doubt that was the intent of the assignment.

vector<vector<int>> array;

Mr. Dragon, I dont think there is need in C++ to supply the size of the data type whose array you want to create since new automatically handles it. You just need to specify the dimensions or the slots required.

your are right -- I was thinking C not C++.:lol:

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

read the first two integers before that loop. something like this:

int nRows, nCols;
int* array;
file >> nRows >> nCols;
array = new int[nRows * nCols * sizeof(int))];
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

He wanted me to initialize the array to 255, and I did. It runs 255 times with wrong output.
I'll post the code

No I did not tell you to run that loop up to 255 -- re-read my example code again, the loop stops when size number of items has been counted (variable size is the number of characters entered from the keyboard).

Do you understand why you want an array of 255 integers for counting purposes ? You could do it with fewer, but 255 is the fastest way. If you do not understand it I'll try to explain it again.

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

It doesn't work because you have not allocated any memory for the objects. array_persons is just an array of 10 pointers that point to some random memory locations. You need to allocate memory using new operator.

array_persons[i] = new Person;

and don't forget to free up the memory before the program terminates using delete

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

I use IE at work, only because I have to. At home I use mostly FireFox except when browsing M$ site then its IE7.

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

Please read the tutorial mentioned in your other thread.

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

what is an AD program? (what does AD mean?)

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

See the Microsoft Enroll tutorial

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

Here is another way

CString array[5] = { "Jack","Jim","Jerry","Judy","Ralph"};
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

After a little googleing around, I found this tutorial

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

Hm read the first post

Yes, I misread it. That is a good example of why the programmer should use pleanty of white space..

whats the posibility that the string have more than 25 chars?

100 % when the string contains some other characters. Loops like that should be made more general to handle strings of any length. Hard-coding the string length is just sloppy programming.

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

But this doesnt help me remove a word as such does it?

I need to remove the word LTD from string

STEPHENJOHNSONLTD

Thanks

use strstr() to find beginning of the word you want to remove, then use a pinter to shift everything left until either a space is found of end of string is found. Now lets see you post some code.

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

First form your string like "STEPHEN JOHNSON".

for (i=0; i<25; i++, string++)
{
   if (*string == '-' && i != 0)
   {
      *(string-1) = '\0';
      
   }
}

and then remove the space.

why does the loop count to 25? What if the string does not contain 25 characters, or if it contains more than 25 characters. Hard-coding a number there is not a good idea.

>> if (*string == '-' && i != 0)
syntax error.

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

please post code using code tags, not coloring. See my signature for link.

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

>> status = fgets(list, 80, inp);

fgets() does not return an integer -- it returns char*. And your loop is incorrect

while(fgets(list, 80, inp) != NULL);
     {
          // blabla
   };

>> fscanf(inp, "%d", &seconds);
fscanf() is the wrong function because it redads from a file not from memory. Since the digits have already been read using fgets(), just use atol() to confert to int

seconds = atol(inp);
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

to get rid of non-alpha characters -- use a pointer to check each char using isalpha() macro. When non-alpha char found, call movemem() to shift all remaining characters lincluding the null terminator left one byte to cover up the non-alpha character.

After you get that working we cal talk about removing the word. Don't try to do all of it all at the same time or you will have trouble doing any of it.

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

I did not get an assert error. I think you got the error because your test data did not compile cleanly -- array f[] should be named a[].

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

Try playing it with this (classic media player):

http://www.afterdawn.com/software/dawnload.cfm?mirror_id=0&version_id=1420&software_id=518

or try codec pack + classic media player:

http://www.free-codecs.com/download_soft.php?d=2270&s=95

I tried both and neither worked. Guess I'll just give up:sad:

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

I downloaded and installed VLC, exited all programs, opened VLC, selected File --> Open and opened that *.vmw file. Same problem as before, but this time I could hear a few seconds of the commercial

I also downloaded and installed XP Codec Pack 2.0, and it had same results as the others.

Is that *.vmw a video file ? Do I need some sort of video hardware othere than the video card? My system is 2.4 GHz AMD 64-bit motherboard, 1 gig RAM

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

is the pulse generator going to actually send data to the computer or just change the state of one of its 32 pins to on and off ?

Please read this site

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

how is the pulse generator connected to the computer?

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

Me too, but I was cutting chili peppers before and forgot to wash my fingers...

:mrgreen: :mrgreen: :mrgreen:

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

Do you have WMP10 Ancient dragon?? (Wmp10 is trash compared to 9)

Alot of ppl have issues with 10 i have noticed....

Good luck :)

I don't know. I'll look when I get back home in about another 5 hours.

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

I would suppose it depends on how the pulse generator is sending the signals -- out its RS232 serial port ? If that is the case you will have to attach an rs232 serial cable to your com1 or com2 port and listen for incoming data on the computer side. Most likely it will be just a change in state of one of the pins instead of incoming data. Its been over 10 years since the last time I have done that so I would have to research some very old code, if I still have it, to see how that is done. One thing for certain, you will need a 16-bit compiler such as Turbo C that will allow direct access to ports. You might also need to do a little assembly language.

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

you should probably get the recommended book Introduction to Computing Systems: From Bits and Gates to C and Beyond and read it. I don't know the first thing about it, so can't help you.

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

No I dont have any issues with this thing, it just asks me to save the file to a specified location

saving the file was not a problem for me either. After its saved double click on it to run it.

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

Yeah, I get very bad pains in my fingers, hands, and arms as well. I try to type as little as possible.

I spend a lot of time on a computer too -- computer programming at work and on DaniWeb at night (sometimes at work too when I have spare time). I've been at a typewriter since 10th grade, about 50 years or so (in those days we didn't have home computers). Now, only my wrists ace occasionally.

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

I tried it again this morning with IE7 -- same results. had to reboot my computer again.

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

cant we giv the input directly as a string to the arry elements like "01231987".

Of course you can -- see fgets() function or for c++ see iostream's cin class.

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

Tried it again, and same problem. This time I disabled Norton Firewall, still have Norton Antivirus running. I'm using XP Pro with SP 2. After downloading the file, double-clicked the file, M$ player came up and that was the end of my os. I had to reboot again.