[Solved] How can I use the function toupper() in this code? [closed]

[ad_1]

You need to toupper every single character, e.g.

while( (leido = read(0,&buffer,sizeof buffer)) > 0){
   for (int i=0; i<leido; i++) {
      buffer[i] = toupper((unsigned char)buffer[i]);
   }
   retorno = write(1,&buffer,leido);
}

2

[ad_2]

solved How can I use the function toupper() in this code? [closed]