Thread: please help me in cuple things

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    88

    please help me in cuple things

    I've learned c in profesional stage
    but i've forgot the most of the things

    i have some simple questions to remind

    1 how do i use string
    for ex.

    void main()
    {
    string line;

    here how i use this
    how can i scan print and all the baisic



    2
    how can i plase a bitmap at the win32 application
    in the WM_PAINT the whole code



    tanx

  2. #2
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    1.
    A string can be declared as:

    char *string;

    There are a lot of functions dealing with strings:

    gets
    puts
    printf
    strcpy
    strcmp
    etc.

    I recommend you buy a book on C programming. A good book which can be used to learn C but which is also an excellent reference:

    The C Programming Language
    Kernighan & Ritchie.

    2.
    Sorry, don't know. You could ask that perhaps in the Windows board or take a look at MSDN.

  3. #3
    Registered User
    Join Date
    Mar 2002
    Posts
    88

    thanks

    ok
    thnx

  4. #4
    Registered User
    Join Date
    Oct 2001
    Posts
    197
    Read automatically fgets() instead of gets().
    Itīs better because more secure.

    klausi
    When I close my eyes nobody can see me...

  5. #5
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >void main()
    This is wrong, any program that uses void main or anything besides int main ( void ) when not taking command line arguments is undefined.

    >string line;
    There is no string data type in C, you can either use a char * or a char array. Just make sure that you allocate enough memory if you use a char *.

    >how can i plase a bitmap at the win32 application
    >in the WM_PAINT the whole code
    Seeing as how the code is rather involved, why not simply look at MSDN. The problem here is that you are asking for code when a simple search will give you already written code, thus saving us the need to type it.

    -Prelude
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Suggestions for things to study
    By Mastadex in forum Windows Programming
    Replies: 5
    Last Post: 08-18-2008, 09:23 AM
  2. Funny things happening outside of function
    By drb2k2 in forum C++ Programming
    Replies: 1
    Last Post: 04-08-2003, 02:26 PM
  3. things to think about... [from www.nuclearwastesite.com]
    By doubleanti in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 11-11-2001, 12:47 AM
  4. What is your favorite things about programming?
    By kermi3 in forum A Brief History of Cprogramming.com
    Replies: 26
    Last Post: 10-21-2001, 12:13 PM
  5. Help with these three things...
    By face_master in forum C++ Programming
    Replies: 2
    Last Post: 08-26-2001, 07:05 AM