Re: [c-prog] New group member

2009-04-05 Thread Michael Sullivan
On Sat, 2009-04-04 at 08:26 -0700, Thomas Hruska wrote: Good morning, Dave - :) (Obligatory '2001: A Space Odyssey' reference...or 'Independence Day', whichever) IIRC this was from Wargames (with Mathew Broderick and Ally Sheedy) The writers placed a tribute to it in ID4.

[c-prog] Stack trace?

2009-03-02 Thread Michael Sullivan
I keep getting these access violations, and the line the program seems to stop on is string Character::getIMFileName() { return imageMapFileName; } Her'e the Character class: class Character { private: string name; int curHP; int curMP; int maxHP; int maxMP; int xPos; int yPos;

[c-prog] Re: Stack trace?

2009-03-02 Thread Michael Sullivan
On Mon, Mar 2, 2009 at 11:35 AM, Michael Sullivan msulli1...@gmail.comwrote: I keep getting these access violations, and the line the program seems to stop on is string Character::getIMFileName() { return imageMapFileName; } Her'e the Character class: class Character { private

[c-prog] Weird...

2009-03-02 Thread Michael Sullivan
The following code: for (int i = 0; i 12; i++) { x = 0; y = 0; if (i = 4 i 8) { x = 100; } if (i = 8 ) { x = 200; } } if I step through it with F10 it works correctly, but if I don't, it doesn't, and at the end of the run x is still 0. Is this a problem with VC++ or a problem

Re: [c-prog] Weird...

2009-03-02 Thread Michael Sullivan
Pretty much, except I added the closing brace for the for loop... On Mon, Mar 2, 2009 at 5:37 PM, Paul Herring pauljherr...@gmail.com wrote: On Mon, Mar 2, 2009 at 11:03 PM, Michael Sullivan msulli1...@gmail.commsulli1355%40gmail.com wrote: if I step through it with F10 it works

Re: [c-prog] Re: DirectX and Access Violation [SOLVED]

2009-03-01 Thread Michael Sullivan
On Sat, 2009-02-28 at 21:07 +, John Matthews wrote: --- In c-prog@yahoogroups.com, John Matthews jm5...@... wrote: --- In c-prog@yahoogroups.com, Michael Sullivan msulli1355@ wrote: ID3D10Texture2D* srcTexture[4]; srcTexture[4] = GetTexture2DFromFile(TEXT(./blackmage.gif

Re: [c-prog] Re: DirectX and Access Violation

2009-02-28 Thread Michael Sullivan
On Sat, 2009-02-28 at 20:32 +, John Matthews wrote: --- In c-prog@yahoogroups.com, Michael Sullivan msulli1...@... wrote: ID3D10Texture2D* srcTexture[4]; srcTexture[4] = GetTexture2DFromFile(TEXT(./blackmage.gif)); Array indices for array[N] are 0..N-1, so there's definitely

Re: [c-prog] pl help me out , need visual c++ package

2009-02-11 Thread Michael Sullivan
On Wed, 2009-02-11 at 05:27 +, real wrote: i am new student of visual c++ ,but i have no pakage of visual c++. kindly help me out to send me visual c++ package. regards nilesh Download it yourself. www.microsoft.com/downloads Get the express edition. It should suit your needs.

Re: [c-prog] Programming for Linux - Which is the best IDE?

2009-01-23 Thread Michael Sullivan
On Fri, 2009-01-23 at 12:52 -0800, Joseph A. Marrero wrote: Emacs or VIM... hands down. I use VIM. I like the syntax coloring, the fact that if I forget a semicolon I can tell because the next line starts at a different character position, etc, etc. --- On Fri, 1/23/09, Brett McCoy

[c-prog] Hello World in Visual C++ 2008 Express

2008-05-15 Thread Michael Sullivan
I started the Accelerated C++ book on the reading list, and I typed in the Hello World program into VC++ 2008. This is my first time using VC ++ 2008. When I build the project, it tells me unresolved external symbol [EMAIL PROTECTED] reference in function ___tmainCRTStartup The program I typed

[c-prog] Re: Hello World in Visual C++ 2008 Express [SOLVED]

2008-05-15 Thread Michael Sullivan
--- In c-prog@yahoogroups.com, Michael Sullivan [EMAIL PROTECTED] wrote: I started the Accelerated C++ book on the reading list, and I typed in the Hello World program into VC++ 2008. This is my first time using VC ++ 2008. When I build the project, it tells me unresolved external symbol

Re: [c-prog] Re: Won't recognize my class 2.0

2007-12-28 Thread Michael Sullivan
On Thu, 2007-12-27 at 20:21 -0700, Thomas Hruska wrote: Michael Sullivan wrote: Eventually, I want to make a complete game with a world map, towns, NPC's, etc, etc, but that's years away. I started with the battle module because that's something I can easily conceptualize in my mind

Re: [c-prog] Won't recognize my class

2007-12-27 Thread Michael Sullivan
On Thu, 2007-12-27 at 15:17 +0100, Tamas Marki wrote: On 12/27/07, Michael Sullivan [EMAIL PROTECTED] wrote: On Wed, 2007-12-26 at 21:03 -0700, Thomas Hruska wrote: Tamas Marki wrote: On 12/26/07, Michael Sullivan [EMAIL PROTECTED] wrote: In my project I have moved the majority

Re: [c-prog] Won't recognize my class

2007-12-27 Thread Michael Sullivan
On Wed, 2007-12-26 at 21:03 -0700, Thomas Hruska wrote: Tamas Marki wrote: On 12/26/07, Michael Sullivan [EMAIL PROTECTED] wrote: In my project I have moved the majority of SDL code from the Battle class to a new class called DrawBattle. I'm trying to build it, but DrawBattle refuses

Re: [c-prog] Re: Won't recognize my class 2.0

2007-12-27 Thread Michael Sullivan
On Thu, 2007-12-27 at 10:38 -0500, Brett McCoy wrote: From a design standpoint, I don't see why the Battle class needs to have a DrawBattle object... I would decouple those and just let the Battle class handle the data for the armies, player characters, etc and let the DrawBattle read the data

[c-prog] Re: Won't recognize my class 2.0

2007-12-27 Thread Michael Sullivan
OK. New code and error messages: [EMAIL PROTECTED] ourrpg $ nl battle.h 1 #ifndef __BATTLE_H__ 2 #define __BATTLE_H__ 3 4 #include SDL/SDL.h 5 #include SDL/SDL_ttf.h 6 #include string 7 #include character.h 8 #include ally.h 9 10 using

Re: [c-prog] Re: Won't recognize my class 2.0

2007-12-27 Thread Michael Sullivan
On Thu, 2007-12-27 at 18:48 -0700, Thomas Hruska wrote: Michael Sullivan wrote: OK. New code and error messages: [EMAIL PROTECTED] ourrpg $ nl battle.h 1 #ifndef __BATTLE_H__ 2 #define __BATTLE_H__ 3 4 #include SDL/SDL.h 5 #include SDL/SDL_ttf.h 6 #include string 7 #include

[c-prog] Won't recognize my class

2007-12-26 Thread Michael Sullivan
In my project I have moved the majority of SDL code from the Battle class to a new class called DrawBattle. I'm trying to build it, but DrawBattle refuses to recognize my Battle class. I know that this isn't finished, but I prefer to debug and rebuild as I go. I have pasted the code for only

Re: [c-prog] Won't recognize my class

2007-12-26 Thread Michael Sullivan
On Wed, 2007-12-26 at 17:35 +0100, Tamas Marki wrote: On 12/26/07, Michael Sullivan [EMAIL PROTECTED] wrote: In my project I have moved the majority of SDL code from the Battle class to a new class called DrawBattle. I'm trying to build it, but DrawBattle refuses to recognize my Battle

Re: [c-prog] Won't recognize my class

2007-12-26 Thread Michael Sullivan
On Wed, 2007-12-26 at 19:35 +0100, Tamas Marki wrote: On Dec 26, 2007 5:41 PM, Michael Sullivan [EMAIL PROTECTED] wrote: On Wed, 2007-12-26 at 17:35 +0100, Tamas Marki wrote: On 12/26/07, Michael Sullivan [EMAIL PROTECTED] wrote: In my project I have moved the majority of SDL code from

Re: [c-prog] Won't recognize my class

2007-12-26 Thread Michael Sullivan
On Wed, 2007-12-26 at 21:16 +0100, Tamas Marki wrote: On Dec 26, 2007 8:52 PM, Michael Sullivan [EMAIL PROTECTED] wrote: On Wed, 2007-12-26 at 19:35 +0100, Tamas Marki wrote: On Dec 26, 2007 5:41 PM, Michael Sullivan [EMAIL PROTECTED] wrote: On Wed, 2007-12-26 at 17:35 +0100, Tamas

[c-prog] Re: Won't recognize my class

2007-12-26 Thread Michael Sullivan
--- In c-prog@yahoogroups.com, Tamas Marki [EMAIL PROTECTED] wrote: That's irrelevant now! Your problem is that you include headers in each other. That's not gonna work. Period. -- Tamas Marki Is this better? [EMAIL PROTECTED] ourrpg $ nl battle.h 1 #ifndef __BATTLE_H__ 2

Re: [c-prog] plz prepare a program

2007-12-21 Thread Michael Sullivan
On Fri, 2007-12-21 at 06:41 +, p.angel88 wrote: write a program which copies one string value to another string variable(without using the help of strcpy) Sounds like homework to me. We had to write an entire string library (of our own creation) as homework in the Programming II class at

Re: [c-prog] Re: Michael (Final Fantasy clone) [SOLVED]

2007-12-17 Thread Michael Sullivan
On Sun, 2007-12-16 at 21:48 -0700, Thomas Hruska wrote: I accidentally deleted all the messages from the thread but I did take one more close look at the code after you let me know that my first suggestion didn't work. If SDL is installed properly AND my other suggestion (making sure the

Re: [c-prog] Need help tracking down SegFault

2007-12-16 Thread Michael Sullivan
On Sat, 2007-12-15 at 21:33 -0700, Thomas Hruska wrote: Michael Sullivan wrote: On Sat, 2007-12-15 at 19:53 +, ed wrote: Michael Sullivan wrote: OK. I need help tracking down a segmentation fault. The problem is that even with the backtrace information from gdb, I'm still

Re: [c-prog] Need help tracking down SegFault

2007-12-16 Thread Michael Sullivan
On Sun, 2007-12-16 at 06:34 -0700, Thomas Hruska wrote: Michael Sullivan wrote: OK. I need help tracking down a segmentation fault. The problem is that even with the backtrace information from gdb, I'm still not exactly sure where it is occurring. Here's the backtrace info: Program

Re: [c-prog] Need help tracking down SegFault

2007-12-16 Thread Michael Sullivan
On Sun, 2007-12-16 at 09:02 -0700, Thomas Hruska wrote: ed wrote: Thomas Hruska wrote: You should seriously consider using an IDE such as KDevelop: http://www.kdevelop.org/ KDevelop uses gdb behind the scenes for debugging without displaying the ugly nitty-gritty details.

Re: [c-prog] Need help tracking down SegFault

2007-12-16 Thread Michael Sullivan
On Sun, 2007-12-16 at 12:59 -0700, Thomas Hruska wrote: Michael Sullivan wrote: On Sun, 2007-12-16 at 09:02 -0700, Thomas Hruska wrote: ed wrote: Thomas Hruska wrote: You should seriously consider using an IDE such as KDevelop: http://www.kdevelop.org/ KDevelop uses gdb behind

Re: [c-prog] Need help tracking down SegFault

2007-12-16 Thread Michael Sullivan
On Sun, 2007-12-16 at 13:46 -0700, Thomas Hruska wrote: Michael Sullivan wrote: Look. I'll make this very, very simple. I DO NOT want to use KDevelop. I use gvim. When I wrote my original source code files, they (the original files) compile just fine while running make at the command

[c-prog] Need help tracking down SegFault

2007-12-15 Thread Michael Sullivan
OK. I need help tracking down a segmentation fault. The problem is that even with the backtrace information from gdb, I'm still not exactly sure where it is occurring. Here's the backtrace info: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x4000 (LWP 31519)]

Re: [c-prog] Need help tracking down SegFault

2007-12-15 Thread Michael Sullivan
On Sat, 2007-12-15 at 19:53 +, ed wrote: Michael Sullivan wrote: OK. I need help tracking down a segmentation fault. The problem is that even with the backtrace information from gdb, I'm still not exactly sure where it is occurring. Here's the backtrace info: Program received

Re: [c-prog] I am new to Visual C++

2007-12-12 Thread Michael Sullivan
On Wed, 2007-12-12 at 17:00 +, Anthony Appleyard wrote: So far I have done by Windows programming on my old faithful Borland 4.5 C++ for Windows. But my new PC which has Windows Vista, needs a more up-to-date compiler, so I got a nearby computer shop to download Visual C++ 8000 for me. I

Re: [c-prog] warning: 'class Character' has virtual functions but non-virtual destructor

2007-12-01 Thread Michael Sullivan
On Fri, 2007-11-30 at 18:31 -0700, Thomas Hruska wrote: Michael Sullivan wrote: What is a non-virtual destructor? Does this mean that there are virtual destructors too? How do I define one? Would it just be virtual ~Character(); Like that? I have two classes that subclass Character

[c-prog] Calling a superclass constructor

2007-12-01 Thread Michael Sullivan
I have classes Ally and Enemy, both subclassed from Character. How can I use Character's constructor from inside the constructor's of Enemy and Ally? Something similar to super() in Java, but I don't know the syntax...

[c-prog] Need help tracking down cause of SegFault

2007-12-01 Thread Michael Sullivan
I know that a segmentation fault is the equivalent of a null pointer exception in Java, but I don't understand why it's happening here. My full code is posted at http://www.espersunited.com/~michael/needhelp.txt . Basically the problem is this: class battle { private: Ally party[4]; };

Re: [c-prog] Need help tracking down cause of SegFault [SOLVED]

2007-12-01 Thread Michael Sullivan
On Sat, 2007-12-01 at 18:02 -0500, Brett McCoy wrote: On Dec 1, 2007 5:27 PM, Michael Sullivan [EMAIL PROTECTED] wrote: I know that a segmentation fault is the equivalent of a null pointer exception in Java, but I don't understand why it's happening here. My full code is posted

[c-prog] warning: 'class Character' has virtual functions but non-virtual destructor

2007-11-30 Thread Michael Sullivan
What is a non-virtual destructor? Does this mean that there are virtual destructors too? How do I define one? Would it just be virtual ~Character(); Like that? I have two classes that subclass Character, and the method in question will be handled slightly differently in each of them, so I

[c-prog] Question about undefined references

2007-11-27 Thread Michael Sullivan
I sent a question to another C group yesterday, so I won't post the full question here unless I don't get any responses before tomorrow, as at least a few people are subscribed to both lists. I have created two classes, each with a header file and a .cpp file. The first class successfully

Re: [c-prog] Question about undefined references

2007-11-27 Thread Michael Sullivan
On Tue, 2007-11-27 at 10:15 -0500, Brett McCoy wrote: On Nov 27, 2007 10:05 AM, Michael Sullivan [EMAIL PROTECTED] wrote: I sent a question to another C group yesterday, so I won't post the full question here unless I don't get any responses before tomorrow, as at least a few people

Re: [c-prog] Visual C++ Express 2008 + Dark GDK

2007-11-24 Thread Michael Sullivan
On Fri, 2007-11-23 at 23:21 -0500, Brett McCoy wrote: I hadn't seen anyone post about this yet, but on Nov 20, Microsoft released Visual Studio C++ Express, an update to their Visual C++ 2005 Express product. I am glad to see they now include the Windows SDK with VC++ Express by default now

Re: [c-prog] hi

2007-11-23 Thread Michael Sullivan
On Fri, 2007-11-23 at 06:24 +, sivag9 wrote: hi everybody, i have one qs fun(int i) { printf(%d,i) fun(i); } what the o/p and what happend to the stack. Well, for one thing, this will eat up all your computer memory...