What should i do next?

What should i do next?

Post by SSJ5 on Thu Apr 02, 2009 5:37 am
([msg=21035]see What should i do next?[/msg])

I have been learning C and C++ over the last few years...

My problem is i don't know where to go next. I know how to use pointers, classes etc... in C++ but i haven't written an actual program, only assigments from the university(calculating arithmetic means, mean deviation etc)...

I have thought of joining some opensource project but i do not have prior experience...

Thank you
SSJ5
New User
New User
 
Posts: 2
Joined: Thu Apr 24, 2008 3:29 am
Blog: View Blog (0)


Re: What should i do next?

Post by BhaaL on Thu Apr 02, 2009 11:33 am
([msg=21057]see Re: What should i do next?[/msg])

Got anything you ever thought "hey, that would be interresting!" or something you could probably need in your everyday-life?
Try to code that. Ask others what they think of it, get their opinion and/or improvements/requests - put them in, rinse and repeat.
This gets you some basic understanding of how others see your app, and in some way also how a "customer" might see your "product" in the future; along with how they tell you what they want, and you finding out what they really want.

On the other side, you might also want to improve in a more algorithmic way. Look for complex topics, or focus on so-called "Design Patterns" first. Altho design patterns are supposed to be generic and independent of language, they are still a good way to practise your language, as you might find out about new stuff you never did before.
BhaaL
Poster
Poster
 
Posts: 270
Joined: Sun Apr 13, 2008 11:16 am
Blog: View Blog (0)


Re: What should i do next?

Post by bird7727 on Thu Apr 02, 2009 5:32 pm
([msg=21073]see Re: What should i do next?[/msg])

As the above poster said, keep coding little things and work your way up. Then try using an API or library or try using sockets. If you have practically mastered C/C++ some day and are in need of another language, try C# or VB.
bird7727
New User
New User
 
Posts: 48
Joined: Sun Feb 01, 2009 12:43 am
Blog: View Blog (0)


Re: What should i do next?

Post by SSJ5 on Mon Apr 06, 2009 1:34 am
([msg=21275]see Re: What should i do next?[/msg])

Could someone give me some examples of API librarys?
SSJ5
New User
New User
 
Posts: 2
Joined: Thu Apr 24, 2008 3:29 am
Blog: View Blog (0)


Re: What should i do next?

Post by bird7727 on Mon Apr 06, 2009 9:31 pm
([msg=21334]see Re: What should i do next?[/msg])

Here's a very simple windows GUI application using the Win32 API:

Code: Select all
#include <windows.h>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>



HWND hwnd, simple_button, icon_button, icon_button2, icon_button3;
HINSTANCE hInstance;
HICON hIcon1, hIcon2;
POINT pt;
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);

int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
            LPSTR lpCmdLine, int nCmd )
{
  MSG  msg ;   
  WNDCLASS wc = {0};
  wc.lpszClassName = TEXT( "Static Control" );
  wc.hInstance     = hInstance ;
  wc.hbrBackground = GetSysColorBrush(COLOR_3DFACE);
  wc.lpfnWndProc   = WndProc ;
  wc.hCursor       = LoadCursor(0,IDC_ARROW);
  wc.hIcon          = LoadIcon (NULL, IDI_APPLICATION);
  wc.hCursor = LoadCursor (NULL, IDC_ARROW);

  RegisterClass(&wc);


hwnd = CreateWindow( wc.lpszClassName, TEXT("Basic Win32API"),WS_BORDER,100, 200, 150, 355, 0, 0, hInstance, 0); 
 
ShowWindow(hwnd, SW_SHOW);
UpdateWindow(hwnd);


  while( GetMessage(&msg, NULL, 0, 0))
  {
    TranslateMessage(&msg);
    DispatchMessage(&msg);
  }
  return (int) msg.wParam;
}

LRESULT CALLBACK WndProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
{
    HDC         hDC;
   PAINTSTRUCT ps;
  RECT        rect;

  switch(msg)
   {
   case WM_PAINT:
         hDC = BeginPaint(hwnd, &ps);
       GetClientRect(hwnd, &rect);
       DrawText(hDC, TEXT("ALT+F4 to Close!"), -1, &rect,
         DT_SINGLELINE | DT_CENTER | DT_BOTTOM);
         DrawText(hDC, TEXT("Basic Win32 Api App \n- Fallen"), -1, &rect,
         DT_CENTER | DT_TOP);
       
       EndPaint(hwnd, &ps);
       break;
     
   case WM_CREATE:
        {
        simple_button =   CreateWindow(TEXT("button"), TEXT("Button1"),   
                     WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON,
                     20, 30, 110, 50,       
                     hwnd, (HMENU) 1, NULL, NULL);
        icon_button =   CreateWindow(TEXT("button"), TEXT("Button2"),   
                     WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON,
                     20, 100, 110, 50,       
                     hwnd, (HMENU) 2, NULL, NULL);
        icon_button2 =   CreateWindow(TEXT("button"), TEXT("Button3"),   
                     WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON,
                     20, 170, 110, 50,       
                     hwnd, (HMENU) 3, NULL, NULL);
        icon_button3 =   CreateWindow(TEXT("button"), TEXT("Button4"),   
                     WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON,
                     20, 240, 110, 50,       
                     hwnd, (HMENU) 4, NULL, NULL);
        break;
    }

   
   case WM_COMMAND:
        {
        switch(LOWORD(wParam))
           {
            case 1:
              //case
              break;
         }
      }
    case WM_DESTROY:
       {
        PostQuitMessage(0);
        return 0;
       }

   }

return DefWindowProc(hwnd, msg, wParam, lParam);
}
bird7727
New User
New User
 
Posts: 48
Joined: Sun Feb 01, 2009 12:43 am
Blog: View Blog (0)


Re: What should i do next?

Post by 193zaitsev on Fri Apr 10, 2009 1:25 pm
([msg=21512]see Re: What should i do next?[/msg])

SSJ5 wrote:Could someone give me some examples of API librarys?

If your interested in...
- graphics or gaming, you could start with trying some 2D games with something like SDL then move on to a 3D API
- threading and multiprogramming, you could try POSIX threads (Pthreads)
- networking or communication, you could try Berkley Sockets
- desktop applications, you could try GTK+

Those are all based on GNU/Linux systems, though I'm sure Windows or other OS have similar APIs.
193zaitsev
New User
New User
 
Posts: 36
Joined: Wed May 21, 2008 10:28 pm
Location: USA
Blog: View Blog (0)


Re: What should i do next?

Post by YayPython on Sat Apr 11, 2009 2:07 am
([msg=21555]see Re: What should i do next?[/msg])

Learning APIs is a good idea.

Also, try setting a goal. Think of a cool idea for a program, then try to achieve it. You can post it here, we'll give constructed criticism and help along the way.

Sit down one day and ask yourself: "What would be an awesome program?"
Then boot up Dev-C++ and start work on it ;)
User avatar
YayPython
Experienced User
Experienced User
 
Posts: 50
Joined: Sat Jan 31, 2009 11:05 am
Blog: View Blog (0)



Return to C and C++

Who is online

Users browsing this forum: No registered users and 0 guests

cron