Jump to content

grimx

Members
  • Posts

    90
  • Joined

  • Last visited

Posts posted by grimx

  1. I'm using Anjuta1.2.4

     

    #include <stdio.h>
    
    #define fSize 80
    
    void Clear_Input(void);
    void ReadFile(void);
    void WriteFile(void);
    void N_Crypt(void);
    void D_Crypt(void);
    
    int main(void)
    {
    char option;
    int running = 1;
    
    while(running)
    {
    	puts("===========Menu============");
    	puts("1) ReadFile	2) WriteFile");
    	puts("3) N_Crypt	 4) D_Crypt");
    	puts("5) Quit");
    	puts("===========================");
    
    	option = getchar();
    	if((option < '1') || (option > '5'))
    	{
    		Clear_Input();
    		puts("Invalid Input");
    		continue;
    	}
    
    	Clear_Input();
    
    	switch(option)
    	{
    		case '1':
    			ReadFile();
    		break;
    		case '2':
    			puts("WriteFile");
    		break;
    		case '3':
    			puts("N_Crypt");
    		break;
    		case '4':
    			puts("D_Crypt");
    		break;
    		case '5':
    			puts("GoodBye");
    				running = 0;
    		break;
    		default:
    				puts("Invalid Input");
    
    	}
    
    }
    
    puts("Done");
    return 0;
    }
    
    void Clear_Input(void)
    {
    while(getchar() != '\n')
    	continue;
    }
    
    void ReadFile(void)
    {
    FILE *fp;
    char fName[fSize];
    int letter = 0;
    
    printf("Enter File To Read: ");
    fgets(fName, fSize, stdin);
    
    printf("Opening %s ....\n", fName);
    if((fp = fopen(fName, "r")) == NULL)
    {
    	printf("Unable To Open ( %s )\n", fName);
    	return;
    }
    
    while((letter = getc(fp)) != EOF)
    	putchar(letter);
    
    fclose(fp);
    printf("\nDone Reading Contents of ( %s )\n", fName);
    
    
    }
    
    void WriteFile(void)
    {
    }
    
    void N_Crypt(void)
    {
    }
    
    void D_Crypt(void)
    {
    }

     

    my problem is in the ReadFile().

    When i get a file name from the keyboard (say "Hello.txt") it does not open the file, but

    when i hardcode the filename "Hello.txt", then it reads the file.

     

    whats going on. :wall:

  2. When i use anjuta1.2.4 wizard to create a Gtk2.0 app and try to compile it i get this

    Auto generating the Project: firstone ...
    WANT_AUTOCONF_2_5=1 ./autogen.sh
    **(anjuta:7168): WARNING**:Cannot execute command: "WANT_AUTOCONF_2_5=1"
    Completed ...sucessful
    Total time taken: 1 secs

    and when i try to build it i get this

    Building source directory of the Project: firstone ...
    make
    make: *** Not targets specified and no makefile found. Stop.
    Completed .. successful
    Total time taken: 0 secs

     

    help.

  3. everytime i try to download "amule" using urpmi i get this:

     

    Some requested packages cannot be installed:
    amule-2.1.3-2plf2007.0.i586 (due to unsatisfied libwx_baseu-2.6.so.0)
    Continue installation anyway? (Y/n)  ----- i tryed typing y and nothing happens

     

    what do i do??

     

    is there a different p2p program??

  4. ok now what do i do next

     

    i can login to gnome in console mode, how would i change my themes back?? maybe that will make so i

    can login to gnome in graphics mode??

    or, uninstall gnome then reinstall it, i don't know.

     

    well i renamed the gnome files in root and restarted, then tryed to login to gnome and the problem

    still remains.

  5. here is what happend , i downloaded a theme and installed it using the theme manager, and using

    the theme manager i was switching icons and when i pressed kde low 16 my gnome desktop lost all

    of my pannels and left just my icons, so i was unable to logout shutdown or even get back to the

    theme manager, so i hit the power button on my pc tower and turned on my comp again, and

    when i tried to log back into gnome it flashes the gnome splash screen and takes me back to the

    login screen.

    HELP :wall:

     

     

    [moved from Installing Mandriva by spinynorman]

  6. ok i have gtk2.0 installed

     

    i got this from the book called "Beginning Linux Programming, Second Edition. by Wrox Press 2003"

     

    when i try to compiling this

    #include <gnome.h>
    
    int main (int argc, char *argv[])
    
    {
    
     GtkWidget *app;
    
     gnome_init ("example", "0.1", argc, argv);
    
     app = gnome_app_new ("example", "Window Title");
    
     gtk_widget_show (app);
    
     gtk_main ();
    
     return 0;
    
    }

     

    i get this

     

    gcc gnome1.c -o example1 `gnome-config --cflags --libs gnomeui`
    bash: gnome-config: command not found
    gnome1.c:1:19: error: gnome.h: No such file or directory
    gnome1.c: In function ‘main’:
    gnome1.c:5: error: ‘GtkWidget’ undeclared (first use in this function)
    gnome1.c:5: error: (Each undeclared identifier is reported only once
    gnome1.c:5: error: for each function it appears in.)
    gnome1.c:5: error: ‘app’ undeclared (first use in this function)

     

    Help

  7. yea it was net_applet i needed, but when i did that and tryed to connect to the internet i couldn't using ppp0,

    i tryed deleting ppp0 and creating another and it still would'nt connect,

    so i reinstalled Mandriva all over again from scratch and it works fine.

    so problem solved.

    i know not to do that again. :wall: lol

×
×
  • Create New...