digitalmars.D.learn - Need help in templates
- Ishan Thilina (36/36) Mar 24 2011 Hi,
- Simen kjaeraas (8/18) Mar 24 2011 Line 10:
- Ishan Thilina (4/4) Mar 25 2011 @Simen:
- =?UTF-8?B?QWxpIMOHZWhyZWxp?= (8/16) Mar 24 2011 made.The
- Regan Heath (16/34) Mar 25 2011 ut =
- Bekenn (2/6) Mar 25 2011 Oddly enough, Thunderbird is one that doesn't.
- spir (6/42) Mar 25 2011 --
- Jesse Phillips (3/9) Mar 25 2011 In general I find attaching files to Usenet annoying. Many times it come...
Hi, I'm still new to D. I tried to implement a stack using templates. But I get an "Access Violation" error when I try to run a test on the stack that I made.The source code is attached with this mail. Can somebody please point out the error of this code? begin 644 main.d M9V%N+BXN(2(I.PT*("`-"B` (`T*"2!3=&%C:R$ *&EN="D ;7E3=&%C:SL- M8V]U;G0],#L- M:&EL92 A;7E3=&%C:RYI<T5M<'1Y*"DI>PT*"0EW<FET969L;B B)60B+&UY M:79A=&4 :6YT(&UA>%-I>F4["2\O<VEZ92!O9B!T:&4 <W1A8VL-" EP<FEV M871E(%1;72!S=&%C:T%R<F%Y.PT*"7!R:79A=&4 :6YT('1O<#L)"2\O=&]P M(&]F('1H92!S=&%C:PT*"0T*"0T*"2\O0V]N<W1R=6-T;W(-" ET:&ES*&EN M97< :6YT6VUA>%-I>F5=.PT*"0ET;W`]+3$["0D)"2\O:6YD:6-A=&5S('1H M870 ;F\ :71E;7, 87)E(&EN('1H92!S=&%C:PT*"0D-" D)?0T*"0T*"2\O M4'5S:"!I=&5M<R!T;R!T:&4 <W1A8VL-" EP=6)L:6, =F]I9"!P=7-H*%0 M"7!U8FQI8R!4('!O<" I>PT*"0ER971U<FX <W1A8VM!<G)A>5MT;W`M+5T[ M('!E96LH*7L-" D)<F5T=7)N('-T86-K07)R87E;=&]P73L-" D)?0T*"0T* M(&)O;VP :7-%;7!T>2 I>PT*"0EI9BAT;W`]/2TQ*7L-" D)"7)E='5R;B!T M<G5E.PT*"0D)?0T*"0EE;'-E>PT*"0D)<F5T=7)N(&9A;'-E.PT*"0D)?0T* M"7!U8FQI8R!B;V]L(&ES1G5L;" I>PT*"0EI9BAT;W`]/6UA>%-I>F4M,2E[ <86QS93L-" D)"7T-" D)?0T*"0T*"7T-" D-" `` ` end
Mar 24 2011
On Fri, 25 Mar 2011 06:18:21 +0100, Ishan Thilina <ishanthilina gmail.com> wrote:Hi, I'm still new to D. I tried to implement a stack using templates. But I get an "Access Violation" error when I try to run a test on the stack that I made.The source code is attached with this mail. Can somebody please point out the error of this code?Line 10:Stack! (int) myStack;Stack!(int) is a class, hence you have to initialize it with new. So this line should be:Stack! (int) myStack = new Stack! (int);or (perhaps more idiomatic):auto myStack = new Stack! (int);-- Simen
Mar 24 2011
Simen: Thanks a lot, That solved the problem :). Ali: :s I'm confused, some of the readers has got the attachment correctly :s
Mar 25 2011
On 03/24/2011 10:18 PM, Ishan Thilina wrote:Hi, I'm still new to D. I tried to implement a stack using templates. ButI get an"Access Violation" error when I try to run a test on the stack that Imade.Thesource code is attached with this mail. Can somebody please point out the error of this code?I would really love to look at it but like some other people all I get is the following non-D code. ;) I don't know whether the problem is on my end but e-mail and news used to be easier. :) Alibegin 644 main.d[snip]
Mar 24 2011
On Fri, 25 Mar 2011 05:51:11 -0000, Ali =C7ehreli <acehreli yahoo.com> w= rote:On 03/24/2011 10:18 PM, Ishan Thilina wrote: > Hi, > > I'm still new to D. I tried to implement a stack using templates. B=ut =I get an > "Access Violation" error when I try to run a test on the stack that=I =made.The > source code is attached with this mail. Can somebody please point o=ut =the > error of this code? I would really love to look at it but like some other people all I get==is the following non-D code. ;) I don't know whether the problem is on==my end but e-mail and news used to be easier. :) Ali > begin 644 main.dEN[snip]FYI.. that's uuencoded data: http://en.wikipedia.org/wiki/Uuencoding it's one of the older style encodings used by NNTP. Most readers should= = support it. If you're on unix there may be a program uudecode which can= = decode it for you. R
Mar 25 2011
On 3/25/2011 3:34 AM, Regan Heath wrote:FYI.. that's uuencoded data: http://en.wikipedia.org/wiki/Uuencoding it's one of the older style encodings used by NNTP. Most readers should support it.Oddly enough, Thunderbird is one that doesn't.
Mar 25 2011
On 03/25/2011 06:18 AM, Ishan Thilina wrote:Hi, I'm still new to D. I tried to implement a stack using templates. But I get an "Access Violation" error when I try to run a test on the stack that I made.The source code is attached with this mail. Can somebody please point out the error of this code?I occasionnally receive such messages from D's mailing list (only):begin 644 main.d M9V%N+BXN(2(I.PT*("`-"B` (`T*"2!3=&%C:R$ *&EN="D ;7E3=&%C:SL- M8V]U;G0],#L- M:&EL92 A;7E3=&%C:RYI<T5M<'1Y*"DI>PT*"0EW<FET969L;B B)60B+&UY M:79A=&4 :6YT(&UA>%-I>F4["2\O<VEZ92!O9B!T:&4 <W1A8VL-" EP<FEV M871E(%1;72!S=&%C:T%R<F%Y.PT*"7!R:79A=&4 :6YT('1O<#L)"2\O=&]P M(&]F('1H92!S=&%C:PT*"0T*"0T*"2\O0V]N<W1R=6-T;W(-" ET:&ES*&EN M97< :6YT6VUA>%-I>F5=.PT*"0ET;W`]+3$["0D)"2\O:6YD:6-A=&5S('1H M870 ;F\ :71E;7, 87)E(&EN('1H92!S=&%C:PT*"0D-" D)?0T*"0T*"2\O M4'5S:"!I=&5M<R!T;R!T:&4 <W1A8VL-" EP=6)L:6, =F]I9"!P=7-H*%0 M"7!U8FQI8R!4('!O<" I>PT*"0ER971U<FX <W1A8VM!<G)A>5MT;W`M+5T[ M('!E96LH*7L-" D)<F5T=7)N('-T86-K07)R87E;=&]P73L-" D)?0T*"0T* M(&)O;VP :7-%;7!T>2 I>PT*"0EI9BAT;W`]/2TQ*7L-" D)"7)E='5R;B!T M<G5E.PT*"0D)?0T*"0EE;'-E>PT*"0D)<F5T=7)N(&9A;'-E.PT*"0D)?0T* M"7!U8FQI8R!B;V]L(&ES1G5L;" I>PT*"0EI9BAT;W`]/6UA>%-I>F4M,2E[ <86QS93L-" D)"7T-" D)?0T*"0T*"7T-" D-" `` ` end-- _________________ vita es estrany spir.wikidot.com
Mar 25 2011
Ishan Thilina Wrote:Hi, I'm still new to D. I tried to implement a stack using templates. But I get an "Access Violation" error when I try to run a test on the stack that I made.The source code is attached with this mail. Can somebody please point out the error of this code?In general I find attaching files to Usenet annoying. Many times it comes in as an encoded file, Web-News is kind enough to let you download the php that generates the page, but not the file. I recommend using a pastbin/gist, this allows the viewing of the file without downloading and usually syntax highlighting. But you have your answer... so next time.
Mar 25 2011