Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8525029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:51:23+00:00 2026-06-11T07:51:23+00:00

Somebody gave me a a program having an error yesterday. Working in MVS 2010,

  • 0

Somebody gave me a a program having an error yesterday. Working in MVS 2010, I found the problem and an alternative for it as well. The problem was the overloaded insertion operator the class. Its prototype was as follows…

void matrix :: operator << (matrix&) ;

It was called from somewhere like this…

matrix m ;
m.operator << (m) ;

I worked out that compiler does not allow to send the same object as a reference parameter upon which the function was called. But I don’t understand the reason behind that and that what problem does it create. I would appreciate if anybody could explain that.
Thanks.

EDIT:
What is actually happening is that upon debugging, it goes inside the function, comes out and at execution of main, goes into the external dependency file dbgdel.cpp and stops at this line.

 _ASSERTE(_BLOCK_TYPE_IS_VALID(pHead->nBlockUse));
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T07:51:25+00:00Added an answer on June 11, 2026 at 7:51 am

    The code given compiles and runs just fine in VS2010 SP1.

    There’s no issue with the code as shown either, it’s perfectly legal. I’s a little odd to declare an operator overload and then call it with operator <<, as you could just as easily write m << m.

    Some guesses:

    • You are taking the address of m somewhere in the operator implementation and accidentally deleting it
    • You are overrunning the boundaries of the array of values that is probably stored in the matrix, inside the operator implementation.
    • There’s a mismatch in the compiler and linker assumptions between the calling code and the called code. Check your calling conventions, version of the runtime libraries on both sides, and any other settings such as SECURE_SCL and interator debugging.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Somebody reports me that the program I gave him that uses log4j doesn't correctly
Somebody generalized the statement Temporaries are rvalues . I said no and gave him
Somebody allready installed MVC 3? I have Windows 7 + VS 2010. Trying to
I was playing the Javascript game with somebody and we were having fun making
Somebody please help me out. This problem is killing me. I went through tones
I'm trying to create a jQuery spinner type thing earlier today somebody gave me
somebody can answer me why occur this problem? With the following code my site
Somebody knows a nice program for creating database models supporting Osx and Linux? If
Somebody proposed this answer: mvccontrib grid - How to add <tr> id is there
somebody mentioned that the function (in this case a method) below is no good

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.