You should look up the syntax of a for statement; what you are doing with it does not make sense.
i'm trying to figure out how to calculate words into tone and base hz: in frequencies that the musical note is a single frequencies.
I don't understand what you are trying to say. What does it mean to "calculate words into tone and base Hz"? Do you have some algorithm you are trying to implement? I am not familiar with whatever domain you are working in so you'll need to give a little more detail.
i'm looking to do is multiply the 2nd cout sperately.
What does this mean? Multiply the cout? cout is an output stream, not a number. Do you mean that you want display it multiple times? Or calculate something differently? I'm lost.
i want to add the tone of words in length and the same for multiple the Mhz. i want to limit the multiplication and adding. how do i have it automatic the subtractions and addition also with multiplication by float decimal point?
when i try to compile the new code that have below this is the error i got:
error: expression list treated as compound expression in initializer [-fpermissive]|
how do i declare the function in line 22?
do i declare variable in this part?
A lot is wrong here; perhaps you should take another look at the tutorial....
Line 7: function declared but never defined.
Lines 16 & 17: Never begin a line with a semicolon.
Lines 18-20: Why the curly brackets?
Line 22: you never named the variable.
Lines 24-26: Why the curly brackets?
Line 28: you meant
1 2 3
for(int i=0;i<strlen(Hz);i++). Also, everything to be executed in the loop needs to be nested in curly brackets.
Line 29: int x=0
Line 30: change it to [code]if( (Hz[i] == ' ') && (Mhz.at == ' ') ) {
replace the && with || if you want it to be one or the other. And actually do something in the loop.
Line 39: Main always returns 0. And you need a curly bracket after it to close the main function
what should i put in where Line 22 and can you give me a example and do i use the string or float?
also Lines 18-20: Why the curly brackets? i want to is not to change the code very much that's one of tutorial told me to
for(int i=0;i<strlen(Hz);i++)
can yo give me an example to strlen in this and what it is suppose to be there?
Lines 13 & 14: Move them out of main() under line 6
Lines 15 & 16: How about const int instead of const char
Lines 22 and 23: add a { at the end of the line.
Line 31: change to a }
Also, the function freq is undefined, and multiplies, add, and multiple are declared but never defined or used.
i've tryed the tutuorial on c++ web site. is there tutorial on youtube that you can recommand? i'm more hands for understanding and also i'm using codeblocks.
also heres some errors that i've tryed to correct
1 2 3 4 5 6
19|error: 'cout' does not name a type|
|20|error: expected constructor, destructor,
or type conversion before '(' token|
[23|error: expected unqualified-id before 'for'|
[23|error: 'i' does not name a type|
24|error: 'x' does not name a type|
what i mean is to have the window still open while i am doing another key words counting and the console window is still open like in dos, multiplication. say that you have 10 x 10 = 100 . i did the addition for the you multiplying by times x. the problem is when i do ashtic it gets a error in code blocks for the newest version i'm on windows 10 x64.