| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | ... HELP ... problems wit |
Hi Miha.
MV> This program (code is bellow) really makes me crazy. I think (I'm
MV> almost sure) it is well written (it compiles in DOS and runs in DOS)
MV> but it wont run in OS/2. I can compile it without a problem, but then
MV> I get an exception 0005. I don't know why. If I try to debug it, it
MV> int _cvtSloscii(char *str1, char *str2)
MV> {
MV> int i;
MV>
MV> i=0;
MV> strcpy(str2,str1);
MV> while(str2[i] != 0)
^^^^
I'm a little rusty with my C programming, but I'm pretty sure that there
is a problem here. It looks like you are trying to loop through to the
end of str2. In C, a string is delimited by a Null with an ASCII value of
zero. You are comparing with the number zero (ASCII value 30H), which may
or may not be in your string. What I think you mean to say is:
while(str2[i] != '\0')
You will need to make this change in all of your functions. Hope this
helps.
Dave
---
* KWQ/2 1.2g * Why waste time learning when ignorance is instantaneous. Hobbes
--- QScan/PCB v1.15b / 01-0348
* Origin: FidoNet: CRS Online, Toronto, Ontario (1:229/15)SEEN-BY: 105/42 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407 SEEN-BY: 712/515 628 704 713/888 800/1 7877/2809 @PATH: 229/15 3615/50 396/1 270/101 105/103 42 712/515 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.