[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

debugger virker ikke, meget simpelt program



Jeg får "Cannot access memory at address" i nedenstående program når jeg stepper nedad. Hvis jeg gennemkører det uden breakpoint, virker det fint. Jeg bruger KDevelop og g++-4.2, jeg er ikke helt klar over, hvilken debugger jeg bruger. Hvis nogen også kan hjælpe med det også, så bliver jeg glad.

include <iostream>
#include <fstream>
#include <assert.h>

using namespace std;

class Test {
  int m_a;
public:
   Test(){
    m_a=0;
   }
   Test(int a): m_a(a) {}
   bool operator ==(const Test &b) const;
};

bool Test::operator ==(const Test &b) const {
  return (m_a==b.m_a);
}

Test a,b;

int main(int argc, char *argv[])
{
  ifstream i;
  cout << "Hello, world!" << endl;
  cout << "Next line" << endl;
  assert(a==b);
  return EXIT_SUCCESS;
}


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2009-02-01, 02:01 CET [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *