My SBA
Posted by Flamez53
Last Updated: March 03, 2013
  2358

Something wrong the hell with this help me plz





// Data Filing Software That Stores Data Files Such As //
// Building Documents, Important Memos, Gas Bills,  //
// Payment Vouchers, Photo Graphs, Etc Etc //

#include <stdio.h>
#include <time.h>

int  main() {
    
    int tm_seconds;
    int tm_min;
    int tm_hour;
    int tm_mday;
    int tm_mon;
    int tm_year;
    int tm_wday;
    int tm_yday;
    
      typedef struct Time {
int    tm_sec   seconds [0,61]
int    tm_min   minutes [0,59]
int    tm_hour  hour [0,23]
int    tm_mday  day of month [1,31]
int    tm_mon   month of year [0,11]
int    tm_year  years since 1900
int    tm_wday  day of week [0,6] (Sunday = 0)
int    tm_yday  day of year [0,365]
      };
      
      
printf(" Welcome To The St Ann Digital Data Storage Software \n ");
printf(" Here Are Your Options For Using This Software Correctly \n");

    


int menu() {
   
    printf("******************************************");
    printf("********************************************");
    printf("***                                         ***");
    printf("***  ST ANN DIGITAL DATA STORAGE SOFTWARE   ***");
    printf("***                                          ***");
    printf("********************************************");
    printf("********************************************");    
                  
    printf("\tMENU");
    printf("( Present Options)");
    printf("Add File - Add File To Storage");
    printf("Del File - Delete File From Storage");
    printf("Move File - Move File From Old To New Storage Location");
    printf("Disp File - Display File In Storage");
    printf("Sear File - Search For File In Storage");
    printf("Exit Software - Exit Digital Data Storage Software");
    
    // Create Stores I.E Folders //
    
   
    return 0;

}



   
  
 
 
   

 
 
oh god it look even worse now :-(
 
here is the correction!

#include <stdio.h>
#include <time.h>


    
    int tm_seconds;
    int tm_min;
    int tm_hour;
    int tm_mday;
    int tm_mon;
    int tm_year;
    int tm_wday;
    int tm_yday;
    
typedef struct t_timee { 
int tm_sec[61];
int tm_min[59];
int tm_hour[23];
int tm_mday[31];
int tm_mon[11];
int tm_year;
int tm_wday [6]; 
int tm_yday[365];
      };
      

    


int  main() {

      
printf(" Welcome To The St Ann Digital Data Storage Software \n ");
printf(" Here Are Your Options For Using This Software Correctly \n");
   
    printf("******************************************\n");
    printf("********************************************\n");
    printf("***                                         ***\n");
    printf("***  ST ANN DIGITAL DATA STORAGE SOFTWARE   ***\n");
    printf("***                                          ***\n");
    printf("********************************************\n");
    printf("********************************************\n");    
                  
    printf("\tMENU");
    printf("Present Options\n");
    printf("Add File - Add File To Storage\n");
    printf("Del File - Delete File From Storage\n");
    printf("Move File - Move File From Old To New Storage Location\n");
    printf("Disp File - Display File In Storage\n");
    printf("Sear File - Search For File In Storage\n");
    printf("Exit Software - Exit Digital Data Storage Software\n");
    
    // Create Stores I.E Folders //
    
   
    return 0;

}
 
whoa bro yo make it look so easy man. ama keep on chugging with the code
 
Have you start creating the functions for the menu option yet. Because what I see you have here so far is just the header, the main, structure and the display info.
 
#include <stdio.h>
#include <time.h>
#include <conio.h>
#include <process.h>
#include <dir.h>

    
    int tm_seconds;
    int tm_min;
    int tm_hour;
    int tm_mday;
    int tm_mon;
    int tm_year;
    int tm_wday;
    int tm_yday;
    char dirname;
    char check;
    char choice;
    
    typedef struct t_timee {
    int tm_sec[61];
    int tm_min[59];
    int tm_hour[23];
    int tm_mday[31];
    int tm_mon[11];
    int tm_year;
    int tm_wday [6];
    int tm_yday[365];
      };
      

    int  main() {

    printf("********************************************\n");
    printf("********************************************\n");
    printf("***                                      ***\n");
    printf("***  ST ANN DIGITAL DATA STORAGE SOFTWARE***\n");
    printf("***                                      ***\n");
    printf("********************************************\n");
    printf("********************************************\n");    
                  
                  
    printf("\n Welcome To The St Ann Digital Data Storage Software \n ");
    printf("\n Here Are Your Options For Using This Software Correctly \n");

                  
    printf("\n Present Options \n");
    printf("\n Add File - Add File To Storage\n");
    printf("\n Del File - Delete File From Storage\n");
    printf("\n Move File - Move File From Old To New Storage Location\n");
    printf("\n Disp File - Display File In Storage\n");
    printf("\n Sear File - Search For File In Storage\n");
    printf("\n Exit Software - Exit Digital Data Storage Software\n");
    
    
    int choice;
    menu();
    printf ("Selection");
    printf ("%c", Selection)
    &choice;
   
    
    while(choice != exit)
    {
        switch(choice)
        {
            case 1:
                   'Add File'
                      break;
            
            case 2:
                   'Delete File'    
                      break;
            
            case 3:
                   'Move File'        
                    break;
            
            case 4:
                   'Disp File'        
                    break;
            
            case 5:
                   'Search File '      
                    break;
                    
            case 6:
                   'Exit'
                   break;
                   
            default:
                   
                    break;
    
    
    // Create Main Directory //
    
    void main(){

      int check;
  char dirname;
  clrscr();
  printf("Enter a directory path and name to be created (C:/name):");
  gets(dirname);
  check = mkdir(dirname);

  if (!check)
  printf("Directory created\n");

 else
 {
   printf("Unable to create directory\n");
   exit();
 }

  getch();
  system("dir/p");
  getch();
}
   
    return 0;
}
 
here is the bug free version.

#include <stdio.h>
#include <time.h>
#include <conio.h>
#include <process.h>
#include <dir.h>
#include <stdlib.h>
void maindir();
    int tm_seconds;
    int tm_min;
    int tm_hour;
    int tm_mday;
    int tm_mon;
    int tm_year;
    int tm_wday;
    int tm_yday;
    char dirname;
    char check;
    char choice;
    char Selection;
    
    typedef struct t_timee {
    int tm_sec[61];
    int tm_min[59];
    int tm_hour[23];
    int tm_mday[31];
    int tm_mon[11];
    int tm_year;
    int tm_wday [6];
    int tm_yday[365];
      };
     

    int  main() {

    printf("********************************************\n");
    printf("********************************************\n");
    printf("***                                      ***\n");
    printf("***  ST ANN DIGITAL DATA STORAGE SOFTWARE***\n");
    printf("***                                      ***\n");
    printf("********************************************\n");
    printf("********************************************\n");    
                  
                  
    printf("\n Welcome To The St Ann Digital Data Storage Software \n ");
    printf("\n Here Are Your Options For Using This Software Correctly \n");

                  
    printf("\n Present Options \n");
    printf("\n Add File - Add File To Storage\n");
    printf("\n Del File - Delete File From Storage\n");
    printf("\n Move File - Move File From Old To New Storage Location\n");
    printf("\n Disp File - Display File In Storage\n");
    printf("\n Sear File - Search For File In Storage\n");
    printf("\n Exit Software - Exit Digital Data Storage Software\n");
    
    
    int choice;
    printf ("\nOption: ");
    scanf ("%c", choice);
   
    
    while(choice != 'E')
    {
        switch(choice)
        {
            case 1: printf("Add file");
                   //'Add File'
                      break;
            
            case 2:printf("Delete file");
                   //'Delete File'    
                      break;
            
            case 3:printf("Move file");
                   //'Move File'        
                    break;
            
            case 4:printf("Disp file");
                 //  'Disp File'        
                    break;
            
            case 5:printf("Search file");
                  // 'Search File '      
                    break;
                    
            case 6:printf("Exit file");
                  // 'Exit'
                   break;
                   
            default:printf("Invalid Option");
                   
                    break;
        }
        }
        return 0;
 
}

    
    // Create Main Directory //
    
    void maindir(){

      int check;
  char dirname;
  printf("Enter a directory path and name to be created (C:/name):");
  scanf("%c", dirname);
  //check = mkdir(dirname);

  if (!check)
  printf("Directory created\n");

 else
 {
   printf("Unable to create directory\n");
   exit(0);
 }

  getch();
  system("dir/p");
  getch();
}
   

 
many thanks friend many thanks