Well, if you haven't created the icon as a resource then you probably have to load the icon at runtime.
You could do this by processing the WM_CREATE message in your windows procedure function. (I am assuming we are talking windows here and not console.. )
This following code when processed after a WM_CREATE message from the windows message loop will load a .ico file and use it as an icon. Note that this code only loads the 32x32 version of the icon - You will need to execute it again for the 16x16 size. (and make sure you get another handle to the smaller icon.. i.e. hIconSm). This in effect sets the values of wc.hIcon and wc.hIconSm in your windows class. (Assuming you have called your windows class wc).
Hope this makes sense, this is a bit rushed.
hIcon = LoadImage(NULL, "Icon.ico", IMAGE_ICON, 32, 32, LR_LOADFROMFILE);
SendMessage(hwnd, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
MessageBox(hwnd, "Couldn't load icon!", "ERROR!", MB_OK | MB_ICONERROR);
Oh - if you don't know, the 32x32 icon is used when your program is minimised in the task bar, the 16x16 icon is located in the top left corner of your program. So, concievably you could have two completely different icons if you so chose!