 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Thu Jul 02, 2009 10:09 pm Post subject: c++ how can i do this? |
|
|
I want to have an array of chars
A,A#,B,C,C#,D,D#,E,F,F#,G,G#,A
How can i put these into an array so that i can do this (example since i dont know how to say it) :
I want to select A# which is place 2 in the array. Using a tradition char array i would only get the A and not the #, which is useless. So i need to be able to select A# in 1 place.
I really dont know how to put it so lemme know if you need more detail. I am basically trying to printf the notes that are playing in my scale app instead of freq.
_________________
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Thu Jul 02, 2009 10:34 pm Post subject: |
|
|
You can either:
1. Make it an array of strings instead of characters, and parse check the length to find out if it has an extra character (being the sharp)
2. Make a struct that contains the letter as a char and then a boolean to represent it as a sharp or not. If you did it this way you could also add sharp, flat, etc.
| Code: | #define NOTE_NONE 0
#define NOTE_FLAT 1
#define NOTE_SHARP 2
struct NOTE
{
CHAR cNote;
DWORD dwFrequency;
}; |
Then you could make a function to parse the struct, check the frequency and make a string from it.
_________________
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|