title: Vowels in string C++
body: <p>I should type in  string and my program should  reorganize elements so Serbian vowels (a,o,i,e,u) should be first elements and then  consonants .My idea was to copy vowels in second string and consonants in third and then make one string (using strcat and vowels and consonant string) but that didn't work as planned... Any ideas what to change or how to do it ? </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  
  int main()
  {
      char s[50],s2[50];
      char vowels[50];
      char consonant[50];
      int k=0,f=0; 
  
      printf("Type string:\n");
      gets(s);
  
  
      for(int i;i&lt;strlen(s);i++)
      {
          if(s[i]={'A','O','I','E','U','a','o','i','e','u'}) s[i]=vowels[k],k++;
          else  s[i]=consonant[f],f++;
      }
  
      strcat(vowels,consonant);
  
       printf("%s",vowels);
  
      return 0;
  
  }
  </code></pre>