🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.games.starcraft
Article #290138

Re: OK you code gurus...

#290138
From: Zealot The Crazy Lui
Date: Wed, 22 Mar 2006 01:18
58 lines
2973 bytes
On Wed, 22 Mar 2006 11:25:48 +1100, Chris Mears <ch...@cmears.id.au>
wrote:

>Zealot The Crazy Lui <ktwils...@NOSPAM.comcast.net> writes:
>
>> On Tue, 21 Mar 2006 16:13:09 -0800, Zealot The Crazy Lui
>> <ktwils...@NOSPAM.comcast.net> wrote:
>>
>>>On Wed, 22 Mar 2006 11:06:35 +1100, Chris Mears <ch...@cmears.id.au>
>>>wrote:
>>>>How have you called getData?
>>>
>>>In the main method, yes. That's when it gets stuck.
>>
>> Of course I missed the "How"...
>>
>> getData( &n, &r );
>> in the main method, n & r are unassigned but defined ints.
>
>Thanks.
>
>The particular error message you got ("Access violation writing location
>0xe7430e45") suggests to me that scanf is trying to write to a pointer
>you gave it but the pointer is wrong.  Can you find out which pointer
>has the value 0xe7430e45?  Use printf("%p"...) to print the values of
>the pointers n, r and scanString in getData().

0012FE1C   0012FF60 0012FF54
scanString n	    r

(all variable pointers are in the 0012F??? range)

Unhandled exception at 0x004182c0 in Combinations and
Permutations.exe: 
0xC0000005: Access violation writing location 0xe7430e45.

printf generates this fun little error:

Unhandled exception at 0x004182cc in Combinations and
Permutations.exe: 0xC000001E:  An attempt was made to execute an
invalid lock sequence.

>It's possible that you are not passing the arguments on the stack in the
>correct order.  If that's the case, scanf will be looking at one of the
>integer pointers as a string, and anything could happen.  Try reversing
>the order of the arguments on the stack.


-- 
"No I'm saying that I'm a cow dung." - Stephen "Suupernuubie" Ung
"Eat a bag of hell." - Cyric The Mad
"I'm all for the girl on girl action, but it could put a strain on the marriage" - LTP

MSN:ktw...@hotmail.com (BUT DON'T SEND E-MAIL!) YIM: ktwilson AIM: YahooKyleW
Zealot the Crazy Lui
Grand 16-Star General and overall director of AGSC operations for the Pronoun Army(and webmaster)
http://pronounarmy.homestead.com/ http://thirty-five-mil.blogspot.com/
re-vamped sig 11111010110.0010.10000
Technical Details
Message-ID: <3c81225rnqblitnfogm8ugpitfbv0te32t@4ax.com>
Path: mbox-mo1.pugleaf.net!g2news1.google.com!news3.google.com!news4.google.com!sn-xt-sjc-15!sn-xt-sjc-12!sn-xt-sjc-08!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
References: <34a022ta3sjetnjnkvluulh8sajiq1t5ih@4ax.com> <m3y7z3wdf8.fsf@loki.cmears.id.au> <0k51221puq4bavvqjqm48ji2t6se21q4pn@4ax.com> <6n5122dpanan4h7l86cnkupkjf2pi0ffkl@4ax.com> <m3pskfwcj7.fsf@loki.cmears.id.au>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!g2news1.google.com!news3.google.com!news4.google.com!sn-xt-sjc-15!sn-xt-sjc-12!sn-xt-sjc-08!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
From: Zealot The Crazy Lui <ktwils...@NOSPAM.comcast.net>
Newsgroups: alt.games.starcraft
Subject: Re: OK you code gurus...
Date: Tue, 21 Mar 2006 17:18:57 -0800
Organization: Posted via Supernews, http://www.supernews.com
Message-ID: <3c81225rnqblitnfogm8ugpitfbv0te32t@4ax.com>
References: <34a022ta3sjetnjnkvluulh8sajiq1t5ih@4ax.com> <m3y7z3wdf8.fsf@loki.cmears.id.au> <0k51221puq4bavvqjqm48ji2t6se21q4pn@4ax.com> <6n5122dpanan4h7l86cnkupkjf2pi0ffkl@4ax.com> <m3pskfwcj7.fsf@loki.cmears.id.au>
X-Newsreader: Forte Agent 3.0/32.763
MIME-Version: 1.0
X-Complaints-To: ab...@supernews.com
Lines: 58
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit