My text file contents are in the form "00101010111101101011".

I want to read it from the file and send each digit to an array,unfortunately i'm only able to use char while reading a file.How do i send each digit onto an array?a

#include <iostream>
#include <iomanip>
#include <fstream>
#include <cmath>
#include <string>
#include <cstdlib>

using namespace std;
int main()
char st[32];
int y[32]={0},n=0;
int fstd=0;

ifstream std;"std.txt");
    std.seekg(0, ios::end ); 
    fstd = std.tellg();
 std >> st[n];
 cout <<endl;
 for(int i=0;i<=fstd;i++){  
 y= (unsigned char) st[i];        
 cout << st[i] << " ";

  return 0;

Here's what I see:"std.txt");
   if(std.is_open())            // Why are you doing this?
       std.seekg(0, ios::end ); // Jump to bottom of file
       fstd = std.tellg();  
    // If open failed, why are you trying to read?,fstd);    // You've jumped to the end of the file
    std >> st[n];         // -- there is nothing there to read