Default Avatar

cja

cja

About

Username
cja
Joined
Visits
0
Last Active
Roles
Member

Comments

  • The problem statement may confuse you by saying the function is "passed four int variables". In order for the values of these arguments to change, they need to be references, or pointers, to the caller's variables. Like this: void rotat…
  • You should walk through your code, explain to yourself what's happening, then ask yourself if that's what you want to do. E.g., "read 26 characters from the input file". What if the file is smaller, or bigger? Don't you want to read the en…
  • You should walk through your code, explain to yourself what's happening, then ask yourself if that's what you want to do. E.g., "read 26 characters from the input file". What if the file is smaller, or bigger? Don't you want to read the en…
  • The aim of this exercise may be for you to use nested 'for' loops, but you can do it in one loop; see example below. There actually is a nested loop, but it's hidden in a function call. I also added indentation, to make the '1's line up, so it produ…
  • What you have might work, but it may be the worst way to do it ... and a switch statement is no better. A lookup table is what you need, like this: #include <iostream> #include <string> #include <sstream> using namespace st…
  • There are no dialog boxes in C. Evidently you're using some kind of GUI library, that you didn't tell us about, so it'll be hard to give you the answer you're looking for.
  • There are no dialog boxes in C. Evidently you're using some kind of GUI library, that you didn't tell us about, so it'll be hard to give you the answer you're looking for.
  • There are no dialog boxes in C. Evidently you're using some kind of GUI library, that you didn't tell us about, so it'll be hard to give you the answer you're looking for.
  • What you have might work, but it may be the worst way to do it ... and a switch statement is no better. A lookup table is what you need, like this: #include <iostream> #include <string> #include <sstream> using namespace st…
  • The aim of this exercise may be for you to use nested 'for' loops, but you can do it in one loop; see example below. There actually is a nested loop, but it's hidden in a function call. I also added indentation, to make the '1's line up, so it produ…
  • You should walk through your code, explain to yourself what's happening, then ask yourself if that's what you want to do. E.g., "read 26 characters from the input file". What if the file is smaller, or bigger? Don't you want to read the en…
  • You should walk through your code, explain to yourself what's happening, then ask yourself if that's what you want to do. E.g., "read 26 characters from the input file". What if the file is smaller, or bigger? Don't you want to read the en…
  • You should walk through your code, explain to yourself what's happening, then ask yourself if that's what you want to do. E.g., "read 26 characters from the input file". What if the file is smaller, or bigger? Don't you want to read the en…
  • The problem statement may confuse you by saying the function is "passed four int variables". In order for the values of these arguments to change, they need to be references, or pointers, to the caller's variables. Like this: void rotat…