Language: C++

#include <iostream>
#include <vector>
#include <bits/stdc++.h>

using namespace std;
#define N_MAX 200000
#define input(d) cin >> d;
#define inputs(n,d) for(int i=0;i<n;i++) {cin >> d[i];}
#define inputxy(n,x,y) for(int i=0;i<n;i++) {cin >> x[i] >> y[i];}
#define output(d) cout << d << endl;
#define outputs(n,d) for(int i=0;i<n;i++) {cout << d[i] << endl;}
#define outputxy(n,x,y) for(int i=0;i<n;i++) {cout << x[i] << y[i] << endl;}
#define f0(i,n) for(int i=0;i<n;i++)
#define f(i,a,b) for(int i=a;i<b;i++)
#define l long
#define ll long long
#define s string

int main(){
    ll n,d,x,y,ans=0;
    input(n);
    vector <char> st(n);

    f0(int i,n){
        cin >> st.at(i);
        if(st.at(i) == 'R'){
            d++;
        }
    }
    f0(int i,d){
        if(st.at(i) == 'W'){
            ans++;
        }
    }
    

    output(ans);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: two or more data types in declaration of 'i'
   13 | #define f0(i,n) for(int i=0;i<n;i++)
      |                     ^~~
a.cc:24:5: note: in expansion of macro 'f0'
   24 |     f0(int i,n){
      |     ^~
a.cc:13:30: error: expected initializer before '<' token
   13 | #define f0(i,n) for(int i=0;i<n;i++)
      |                              ^
a.cc:24:5: note: in expansion of macro 'f0'
   24 |     f0(int i,n){
      |     ^~
a.cc:13:30: error: expected ';' before '<' token
   13 | #define f0(i,n) for(int i=0;i<n;i++)
      |                              ^
a.cc:24:5: note: in expansion of macro 'f0'
   24 |     f0(int i,n){
      |     ^~
a.cc:13:30: error: expected primary-expression before '<' token
   13 | #define f0(i,n) for(int i=0;i<n;i++)
      |                              ^
a.cc:24:5: note: in expansion of macro 'f0'
   24 |     f0(int i,n){
      |     ^~
a.cc:13:32: error: expected ')' before ';' token
   13 | #define f0(i,n) for(int i=0;i<n;i++)
      |                    ~           ^
a.cc:24:5: note: in expansion of macro 'f0'
   24 |     f0(int i,n){
      |     ^~
a.cc:13:34: error: expected initializer before '++' token
   13 | #define f0(i,n) for(int i=0;i<n;i++)
      |                                  ^~
a.cc:24:5: note: in expansion of macro 'f0'
   24 |     f0(int i,n){
      |     ^~
a.cc:13:21: error: two or more data types in declaration of 'i'
   13 | #define f0(i,n) for(int i=0;i<n;i++)
      |                     ^~~
a.cc:30:5: note: in expansion of macro 'f0'
   30 |     f0(int i,d){
      |     ^~
a.cc:13:30: error: expected initializer before '<' token
   13 | #define f0(i,n) for(int i=0;i<n;i++)
      |                              ^
a.cc:30:5: note: in expansion of macro 'f0'
   30 |     f0(int i,d){
      |     ^~
a.cc:13:30: error: expected ';' before '<' token
   13 | #define f0(i,n) for(int i=0;i<n;i++)
      |                              ^
a.cc:30:5: note: in expansion of macro 'f0'
   30 |     f0(int i,d){
      |     ^~
a.cc:13:30: error: expected primary-expression before '<' token
   13 | #define f0(i,n) for(int i=0;i<n;i++)
      |                              ^
a.cc:30:5: note: in expansion of macro 'f0'
   30 |     f0(int i,d){
      |     ^~
a.cc:13:32: error: expected ')' before ';' token
   13 | #define f0(i,n) for(int i=0;i<n;i++)
      |                    ~           ^
a.cc:30:5: note: in expansion of macro 'f0'
   30 |     f0(int i,d){
      |     ^~
a.cc:13:34: error: expected initializer before '++' token
   13 | #define f0(i,n) for(int i=0;i<n;i++)
      |                                  ^~
a.cc:30:5: note: in expansion of macro 'f0'
   30 |     f0(int i,d){
      |     ^~