Jump to content

Transpose a non-square matrix in C withou buffer matrix


Brok
 Share

Recommended Posts

You still have a temporary variable, you're just using a lot of them in a function instead of one big buffer.

 

Just for fun, there IS a way to switch to variables without declaring a third.

 

int a = 3;

int b = 7;

a += b;

b = a - b;

a -= b;

 

I don't recommend doing that because you could create a number that exceeds the range of your data type.

  • Upvote 2

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...