c++ – Spinning slash wheel to represent an Ongoing operation

I have written a simple program to represent the computer is doing an operation. It is suppose to show a rotating slash character to the user with every second passed however the program does not work as intended. It shows all the characters instead of cleaning the screen and show just the spinning slash character.

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>

int main(){
char wheel(3) = {'\','|','/'};

int j=0;
int i = 0;
while(j<6){
    printf("(%c)",wheel(i));
    sleep(1);
    system("clear");
    i++;
    if(i>2) i=0;
    j++;
}


return 0;
}