Error Message when run program

This is a discussion on Error Message when run program within the C++ Programming forums, part of the General Programming Boards category; This was the lowest in the callstack. I did look carefully in my code, the buttoncontrol contains almost 1500 lines ...

  1. #16
    Registered User
    Join Date
    Dec 2007
    Posts
    383
    This was the lowest in the callstack. I did look carefully in my code, the buttoncontrol contains almost 1500 lines so it is much to look for manually. I did have a feeling that I did something wrong with the vectors and as you said, I did access positions that did not exist.
    I also began the acess at 1 and not 0.
    So some changes like this did it. It was a vectorproblem.

    So I did change this code so now it seems to actully work. An automatic program did press the button for 24 hours(1200 times) with no Errormessage
    Thank you!
    Last edited by Coding; 03-02-2008 at 06:09 PM.

  2. #17
    Registered User
    Join Date
    Dec 2007
    Posts
    383
    Elysia, I know that I shouldn´t mix managed and unmanaged code.
    I know that this is not "correct". But I also ´know´ that it do works, so when you tell me to go managed I do understand completely what you are meening but you are also telling me to rewrite about 2000 lines of code and solutions to managed that I mostly have to learn also.
    One day I will but as a ´beginner´ not now.

    Even if I go managed, I will have as ´many headaches´ as now. Because I will do wrongs there also but I really do point out that I know that you are right about use managed code.
    I mix it now and know that is not ´correct´to do and if I will face big problems that depend on really that, then I have to change it.
    I appreciate that you tell me but I wont change it right now.
    (I might be wrong)
    Last edited by Coding; 03-02-2008 at 06:05 PM.

  3. #18
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,160
    Quote Originally Posted by Coding View Post
    sorry if asking but what is the "call stack". Is this something inside VC++ that creates when just debugging the program and not run it ?
    The call stack always exists whether the program is in debug mode or not. In debug mode, the call stack might be more informative than it otherwise would be, but it's always there.

  4. #19
    Registered User
    Join Date
    Dec 2007
    Posts
    383
    Yes okay, that is good to know.

    I didn´t know that...

  5. #20
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,171
    People seem to get all confused and offer wrong suggestions to you since you post in C++ yet use Managed. The new macro, for example, you should avoid, seeing as it may interfere with the managed code.
    And if you truly don't listen to anything and still walk down this path, then remember this: Do not mix native and managed in such a way to you use managed types with native containers, or vice versa. Stay in the respective area and keep those areas fully managed or native.

    If you try to access non-existant elements in a vector, you will get an assert, or three, in debug, however.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.
    For information on how to enable C++11 on your compiler, look here.
    よく聞くがいい!私は天才だからね! ^_^

  6. #21
    Registered User
    Join Date
    Dec 2007
    Posts
    383
    Yes, thanks Elysia. I will keep that in mind. I do listen to what you say ofcourse and I will think about the containers as you mentioned.

  7. #22
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,171
    Quote Originally Posted by Coding View Post
    I do listen to what you say ofcourse and I will think about the containers as you mentioned.
    Yes, you do listen, but you don't seem to listen when I say don't mix native and managed
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.
    For information on how to enable C++11 on your compiler, look here.
    よく聞くがいい!私は天才だからね! ^_^

  8. #23
    Registered User
    Join Date
    Dec 2007
    Posts
    383
    hehe... one day I will change all my code to only managed, just to much for me to do now

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Program Plan
    By Programmer_P in forum C++ Programming
    Replies: 0
    Last Post: 05-11-2009, 01:42 AM
  2. Client-server system with input from separate program
    By robot-ic in forum Networking/Device Communication
    Replies: 3
    Last Post: 01-16-2009, 02:30 PM
  3. Re-doing a C program to run in Win2000 or XP
    By fifi in forum C Programming
    Replies: 5
    Last Post: 08-17-2007, 05:32 PM
  4. Replies: 3
    Last Post: 07-11-2005, 03:07 AM
  5. plz help me run this program!!!
    By galmca in forum C Programming
    Replies: 8
    Last Post: 02-01-2005, 12:00 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21