Thread: Open Url

  1. #1
    Registered User
    Join Date
    May 2009
    Location
    athens
    Posts
    21

    Open Url

    Hi.I am new to C and i am trying to create some small apps just for learning.
    How to create a simple browser just to open a url that i will give to him?

  2. #2
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Creating a browser isn't exactly what I'd call a "simple" app.
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

  3. #3
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    How about you start with something simpler than writing a browser if you are new to this language? Like reading lines of text and printing them backwards or something.
    1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
    2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
    3. Get rid of conio.h and other antiquated DOS crap headers.
    4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.

  4. #4
    Registered User
    Join Date
    May 2009
    Location
    athens
    Posts
    21
    But i dont know what other "projects" to create.I have created a calc,a converter from euro to dollar,from Fahrenheit to Celsius.Now?I have not any other idea from simple programs and i am stack here

  5. #5
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
    2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
    3. Get rid of conio.h and other antiquated DOS crap headers.
    4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.

  6. #6
    Registered User
    Join Date
    May 2009
    Location
    athens
    Posts
    21
    I think this is that i was looking for
    Ok.I will start from here
    Thanks a lot

  7. #7
    Registered User jephthah's Avatar
    Join Date
    May 2010
    Location
    seattle
    Posts
    49
    i can has a browzer.

    Code:
    int main (void)
    {
        char url[260];
    
        printf("enter URL: ");
        scanf("%s",url);
        printf("HA HA HA\n");
        printf("I'm Using Teh Intarnet!\n");
    
        return 0;
    }
    Last edited by jephthah; 05-17-2010 at 08:12 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. URL splitter
    By monki000 in forum C Programming
    Replies: 10
    Last Post: 02-18-2010, 12:36 AM
  2. Open Watcom CreateThread pointer parameter problems, m'kay?
    By Mad_guy in forum Windows Programming
    Replies: 2
    Last Post: 11-06-2005, 01:26 AM
  3. Way to get the current open programs displayed?
    By CPPguy1111 in forum C++ Programming
    Replies: 6
    Last Post: 06-22-2005, 12:24 AM
  4. Open files inside directory (UNIX platform)
    By swagatob in forum C Programming
    Replies: 15
    Last Post: 10-25-2004, 12:58 AM
  5. Big help in Astar search code...
    By alvifarooq in forum C++ Programming
    Replies: 6
    Last Post: 09-24-2004, 11:38 AM