Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

avenger_sb25

@avenger_sb25
About
Posts
64
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How To debug a Running DLL
    A avenger_sb25

    Well , if you are using Visual Studio IDE, Press F9 to set a breakpoint in the source file. Then, Go to : Project>>Settings>>Debug TAB In the "Executable for debug session:" Edit box, BROWSE and select the EXE file that is going to use your dll. THEN PRESS 'OK' NOW RUN YOUR PROGRAM BY CLICKING THE '!' ICON OR ON THE TOOLBAR...or . THIS WILL RUN THE EXE THAT YOU SELECTED EARLIER. NOW IF THAT PROGRAM(EXE) MAKES USE OF AN EXPORTED FUNCTION FROM YOUR DLL, AND IF YOU HAVE SET UP YOUR BREAKPOINTS CORRECTLY, YOU CAN DEBUG YOUR DLL...... happy debugging! ...Avenger


    Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs

    C / C++ / MFC help debugging tutorial

  • Base pointer Blues!!!
    A avenger_sb25

    Nice trying Clinton!:-D If you come up with a better solution, do let me know chao!:rose: ...Avenger


    Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs

    C / C++ / MFC data-structures testing beta-testing help tutorial

  • Base pointer Blues!!!
    A avenger_sb25

    Suppose i have a set up like this:

    class Base
    {
    public:
    int x;
    virtual void f()
    };
    class Derv:public Base
    {
    public:
    int y;
    void f();
    };

    void main()
    {
    Base *p;
    p=new Derv[4];

       //I WANT TO ACCESS EACH ENTRY OF THE ALLOCATED ARRAY USING POINTER OF BASE
       for(int i=0;i<4;i++)
          (p+i)->y=10;  //THIS CRASHES WHEN i>0 AS I HAVE EXPLAINED BELOW
    
        delete\[\]p;
    

    }

    NOW HERE IS THE PROBLEM- I can access the first element using pointer 'p' BUT if i try to acces the second element of the array by doing p+1, MY PROGRAM CRASHES... This is the problem: Suppose the derived class array was allocated at 0x00000000, then p contains 0x11111111. I thought that p+1 will be 0x11111111+sizeof(Derv), BUT it is 0x11111111+sizeof(Base) SO WHAT I WANT TO KNOW FORM YOU FRIENDS IS - HOW TO ACCESS THE ELEMENTS OF A DERIVED CLASS ARRAY USING BASE CLASS POINTER ??? thanx for ur time ...Avenger


    Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs

    C / C++ / MFC data-structures testing beta-testing help tutorial

  • How to clear the screen in DOS
    A avenger_sb25

    >>erase all previous lines). For dos baserd compiler... the function is: clrscr(); The header file for it is #include conio=Console I/O I hope that makes you happy. :) ...Avenger


    Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs

    C / C++ / MFC c++ game-dev help tutorial question

  • REFERENCE TO ARRAY OF 10 INTEGERS
    A avenger_sb25

    no... this is wrong... i am happy that markuk has given the corect answer. Take a look at his reply. :) thanx anyway ...Avenger


    Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs

    C / C++ / MFC data-structures testing beta-testing tutorial

  • REFERENCE TO ARRAY OF 10 INTEGERS
    A avenger_sb25

    THANX A LOT 'markkuk'. U are a GENIUS (i mean ur computer) It works. Please please please tell me in which book did u find that syntax.... I was reading C++ from Stroupstrup and in fact... that was a question from the exercises of chapter-5. But i cudnt dig out that particular syntax. thanx. ...Avenger


    Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs

    C / C++ / MFC data-structures testing beta-testing tutorial

  • REFERENCE TO ARRAY OF 10 INTEGERS
    A avenger_sb25

    I tried the same myself but i get a bad error WITH THIS....

    int fn(int&a)
    {
    }
    int main(int argc, char* argv[])
    {
    int abb[10];
    fn(abb);
    return 0;
    }

    ERROR: C:\Windows\Desktop\a\a.cpp(19) : error C2664: 'fn' : cannot convert parameter 1 from 'int [10]' to 'int &' A reference that is not to 'const' cannot be bound to a non-lvalue ...Avenger


    Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs

    C / C++ / MFC data-structures testing beta-testing tutorial

  • Logging data in MS-ACCESS......few problems!!!
    A avenger_sb25

    I dont know much but... "Ms Access uses JET DATABASE DRIVER". You use ODBC which acts as an interface between your application and JET ...Avenger


    Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs

    C / C++ / MFC database linux help question

  • Problems with files
    A avenger_sb25

    >>well at first i just read all of it into one buffer. i defined it like so >>char *szBuffer; Well Mr. Hotshot, are you allocating memory for szBuffer ??? before using it with your file-handling-functions.... IF NO.... god help you X| . If yes... sorry. USE malloc or new to alllocate appropriate amount of memory. >>note: when i did this in segments i defined my buffer like >>char szBuffer[1024]; look closely... here you alocate the buffer's size to be 1024 bytes. BUT in char* szBuffer.... YOU MAY NOT BE ALLOCATING ANY MEMORY and the 'BLUE SCREEN' loves programmers like you. ;P .... i hope i helped;) ...Avenger


    Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs

    C / C++ / MFC help

  • extfloodfill problem ?
    A avenger_sb25

    hey, how about blitting the bitmap to that device context and then using the same floodfill function ;) ...Avenger


    Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs

    C / C++ / MFC graphics help question

  • REFERENCE TO ARRAY OF 10 INTEGERS
    A avenger_sb25

    Please give me an example/syntax of: REFERENCE TO ARRAY OF 10 INTEGERS Maybe it is very eazy but my super genius stops working for eazy questions... :( ...:doh: ...Avenger


    Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs

    C / C++ / MFC data-structures testing beta-testing tutorial

  • Getting Text from Seperate Dialog
    A avenger_sb25

    Is the different dialog, a dialog of a different application? If it isnt so, does this help? CWnd::GetDlgItemText int GetDlgItemText( int nID, LPTSTR lpStr, int nMaxCount ) const; int GetDlgItemText( int nID, CString& rString ) const; ...Avenger


    Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs

    C / C++ / MFC help c++

  • MACRO vs INLINE FUNCTION
    A avenger_sb25

    Is that something you say when you dont know the answer Mr? Anyway a proper answer would have been appreciated. I was asked this questionj at a job interview. When i will get the job, i will pay u. LOL ...Avenger


    Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs

    C / C++ / MFC c++ visual-studio testing beta-testing performance

  • size of an empty class??
    A avenger_sb25

    Base class sub-objects may have zero size Can u please give a working example. I did class p { }; class q: public p { }; p o1; q o2; cout< I get 1 in both. Thank you. ...Avenger * * * Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs

    C / C++ / MFC question testing beta-testing career

  • size of an empty class??
    A avenger_sb25

    Ya, thanx for ur reply and to tell the technique to see linker output ;) (thats a new thing i learnt) But, why 1? is it property of the linker or a C++ standard to make size of an empty class as 1. Please tell. ...Avenger


    Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs

    C / C++ / MFC question testing beta-testing career

  • MACRO vs INLINE FUNCTION
    A avenger_sb25

    Hi geeks,:suss: Please tell me when to use a MACRO and when to use an INLINE FUNCTION in C++. If this question has been asked before, please point me to that link. I need an answer comparing the two. Please dont post definitions of macro and inline function as i am aware of them. Please give the answer in terms of efficiency, speed, code-size, pre-compilation/post-compilation, and things like that. And please give examples ... :rose: ...Avenger


    Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs

    C / C++ / MFC c++ visual-studio testing beta-testing performance

  • size of an empty class??
    A avenger_sb25

    Hi einstines, i was asked this question at an interview: class a { }; main() { cout<//WHATS THE OUTPUT? } I can obviously run the program to find the output but i need an explanation about the output. PLEASE ANSWER: WHAT IS THE OUTPUT???? ...Avenger


    Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs

    C / C++ / MFC question testing beta-testing career

  • Winsock Spy Program
    A avenger_sb25

    cant say for sure, but try running "netstat" from the command-promt in a seperate window when u run ur program. Well, netstat gives list and condition of all active connections and at-times becomes very messy, but try it if u dont find anything else. ...Avenger


    Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs

    C / C++ / MFC question

  • TEXT?
    A avenger_sb25

    It has nothing to do with MFC. If u want ur MFC/API program to be portable and compatible with systems that use UNICODE representation of characters, then use the TEXT MACRO before all strings. ...Avenger


    Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs

    C / C++ / MFC c++ com question

  • fire button when pressing enter in and edit box
    A avenger_sb25

    HI r00k13, i cant say for sure what is wrong but just try this. If it works, its gud 4 u. When u create a dialog box in the Dialog Editor, u r provided with two default buttons -OK & CNACEL. The proerty you are asking for is also present by default. (I have checked on my system, it is there even when u make a multiline edit box in the dialog). The OK button is clicked(OnIDOK() is called) when we press the "RETURN" key. It may be the case that you have deleted the default OK button and you have currently set a new button(that u hav created) as default. If it is so, change the ID if ur default Button from whatever it is currently, to IDOK. It may :cool: solve ur problem. Just giv it a try. Tell me if it works. ...Avenger


    Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs

    C / C++ / MFC question com help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups