cin, cout, matrix, pointers and references :(

Home Forums C Programming cin, cout, matrix, pointers and references :(

This topic contains 1 reply, has 2 voices, and was last updated by  Humayan 11 years, 8 months ago.

  • Author
  • #2081


    i am working with a matrix manipulation program…consists of a matrix class and its member functions..i have also overloaded < < and >>…so dat dey can read and print d whole matrix at one statement..the code of these overloaded operators is something like this..

    here i have received the variable matrix1 by reference…in main() i have used a variable matrix1 which is passed as follows :matrix matrix1;cin >> matrix1;now…my question is : wat if i want to pass a pointer variable which should be received by a reference…smthing like this…

    the overloaded function for pointer thing is coded as follows :

    however my problem is when i execute the program…then while taking input for a pointer matrix…it just reads one value instead of all the values..but doesnt even print that single value..i think there must be bug in those overloaded functions used for pointer variable.. :(so please check out the functions and post the solution or your suggestions…

  • #3367


    Can you post the whole code?

You must be logged in to reply to this topic.