Well i fixed it ^^
It runs flawlessly now ^^
Thank allot for the tip !

Code:
  1. #include <fstream.h>
  2. void refill() ;
  3. void fill ( ) ;
  4. void testif ( ) ;
  5. void addchar ( ) ;
  6. void filla ( ) ;
  7. int i = 0 ;
  8. int hold ;
  9. char array[50] ;
  10. int num ;
  11. int line ;
  12. const int maxchar = 6 ;
  13. ofstream File;
  14. int main ()
  15. {
  16. File.open("File.txt",ios::out);
  17. line = 0 ;
  18. num = 0 ;
  19. array[1] = '\0' ;
  20. fill ( ) ;
  21. File.close();
  22. return 0 ;
  23. }
  24. void fill ( )
  25. {
  26. array[num] = 'a' ;
  27. array[num +1] = '\0' ;
  28. for ( i = 0 ; i < 25 ; i++ )
  29. {
  30. File << array << " " ;
  31. array[num]++ ;
  32. }
  33. File << array << " " ;
  34. testif ( ) ;
  35. }
  36. void testif ( )
  37. {
  38. while ( num != maxchar ) {
  39. if ( line == 0)
  40. addchar( ) ;
  41. filla();
  42. if ( array [line -1 ] == 'z' ){
  43. line-- ;
  44. }
  45. else {
  46. array [line - 1 ] ++ ;
  47. hold = line ;
  48. refill () ;
  49. filla() ;
  50. }
  51. }
  52. }
  53. void addchar ()
  54. {
  55. num ++ ;
  56. line = num ;
  57. array [num +1] = '\0' ;
  58. for ( i = 0 ; i < num ; i++ )
  59. array[i] = 'a' ;
  60. }
  61. void filla ( )
  62. {
  63. if ( num != maxchar ) {
  64. array[num] = 'a' ;
  65. array[num +1] = '\0' ;
  66. for ( i = 0 ; i < 25 ; i++ )
  67. {
  68. File << array << " " ;
  69. array[num]++ ;
  70. }
  71. File << array << " " ;
  72. }
  73. }
  74. void refill()
  75. {
  76. for ( hold ; hold <= num ; hold++ ) {
  77. array[hold] = 'a' ;
  78. }
  79. line = num ;
  80. }