18 C:\Dev-Cpp\project333 misc\cvc3roll.cpp expected primary-expression before ']' tokenhave tried "rollup(q)" rollup(&q) and changed .h to *q have triedCode:/* cvc3.h */ // roll string #ifndef CVC3ROLL_H #define CVC3ROLL_H void rollup( char b[]) { for(int a; a < sizeof b ; a++ ) { ... // roll func() } // std::cout << b << endl ; } #endif /* cvc3.cpp */ #include "cvc3rolle.h" #include <iostream> using namespace std; int main(){ char q[] = "ababdddd test text of string for roll " ; for(int a = 0 ; a < 2 ; a++ ) { rollup(q[]); cout << q << endl; } }
i know #define CVC3ROLL_H is diff from #include "cvc3rolle.h" .h mod several times seems not issue.
thinking cpp say
almost same prog. mine use char while tcpp use int. and i use .hCode://: C03:Return.cpp // Use of "return" #include <iostream> using namespace std; char cfunc(int i) { ... } int main() { cout << "type an integer: "; int val; cin >> val; cout << cfunc(val) << endl; } ///:~
tia any ideas ?