Search:

Type: Posts; User: Sober

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    10
    Views
    2,329

    I considered your suggestion about the static...

    I considered your suggestion about the static variables and instead passed the string to the function again. That solved the problem. Thanks
  2. Replies
    10
    Views
    2,329

    I manage to debug using Dev-C++. The backtrace...

    I manage to debug using Dev-C++. The backtrace shows the right values for the variable m in reverse order but it is not what is being displayed.


    void Recurse(int m)
    {

    cout<<m<<"...
  3. Replies
    10
    Views
    2,329

    Oh sorry thats supposed to be Function Recurse...

    Oh sorry thats supposed to be Function Recurse with 1 parameter of type int. I have corrected it above.
    Well your deduction is right. I wanted to use the debugger but find it to be a nightmare with...
  4. Replies
    10
    Views
    2,329

    I have tried this recursive function. The value...

    I have tried this recursive function. The value of m is 1 when the function is first called.

    NumberOfStage delimits the number of Nodes present and XL is a pointer to a struct i mentioned earlier....
  5. Replies
    10
    Views
    2,329

    Exactly. I have all the required data but dont...

    Exactly. I have all the required data but dont know how to code it in order to output the found paths. I have tried and got the paths displayed as long as there are no more than 2 sublevels, by...
  6. Replies
    10
    Views
    2,329

    This is an extract of the output generated : ...

    This is an extract of the output generated :



    The map you input is as follows.

    Level:1 has 1 Stage(s).
    Level:2 has 3 Stage(s).
    Level:3 has 3 Stage(s).
    Level:4 has 2 Stage(s).
  7. Replies
    10
    Views
    2,329

    Dynammic programming - optimal Routes Listing

    The task is to use dynamic programming to find optimal routes. This is done by calculating the minimal sum that can be obtained and then find paths which gives that sum.
    I coded the input capture...
  8. Replies
    8
    Views
    1,521

    thank you. However even when the line...

    thank you. However even when the line 'ext[(len-hd)-1]=array[hd];' is uncomment, the result is the same ...the length return by strlen is 21 while ext is declared with limit 5. So I still wonder why.
  9. Replies
    8
    Views
    1,521

    Well thank you for your advice on fgets. I...

    Well thank you for your advice on fgets.

    I modified to the following :



    #include <stdio.h>
    #include <stdlib.h>

    int main()
  10. Replies
    8
    Views
    1,521

    Pointer to character array

    Am actually coding a program to rename files in a directory....For this to be possible each file has to keep their extension... So am doing a seperate coding to see how to grab the extension. I came...
  11. Replies
    2
    Views
    856

    Thank you very much. Now I can manage.

    Thank you very much. Now I can manage.
  12. Replies
    2
    Views
    856

    Accessing sub-directories

    Hello I have been trying to scan a directory and list it's containing files and folders. Up to that limit am fine but I cannot manage to visit the sub-directories for further scan.

    I have read...
  13. Replies
    3
    Views
    1,286

    You should be more specific or/and show part of...

    You should be more specific or/and show part of your code concerning the problem. May be you mean a menu to select operation...then I suggest this:




    // function declarations goes here

    int...
  14. Replies
    14
    Views
    15,983

    Yeah got that now.But I used to think memory is...

    Yeah got that now.But I used to think memory is deallocated when application is exited..process ended..I got to revise the fundamentals :p
  15. Replies
    14
    Views
    15,983

    Great .Thanks. I didn't thought declaring static...

    Great .Thanks. I didn't thought declaring static variables for a function would make such a difference..
  16. Replies
    14
    Views
    15,983

    On any selection made I get '0' Whats...

    On any selection made I get '0'
    Whats happening?




    BOOL CALLBACK DlgNG(HWND dlgst, UINT Message, WPARAM wParam, LPARAM lParam)
    {
    HWND hCombo;
    TCHAR chTxt[3]; //text to add to combobox...
  17. Replies
    14
    Views
    15,983

    BOOL CALLBACK DlgNG(HWND dlgst, UINT Message,...

    BOOL CALLBACK DlgNG(HWND dlgst, UINT Message, WPARAM wParam, LPARAM lParam)
    {
    HWND hCombo;
    TCHAR chTxt[3]; //text to add to combobox control(s)
    char *sel;
    switch(Message)
    {
    case...
  18. Replies
    14
    Views
    15,983

    Apparently nothing..I used trhe return value,...

    Apparently nothing..I used trhe return value, which I stored in the integer variable, to display the number of players of the game am creating...

    BUt since I initially assigned the value 3 to...
  19. Replies
    14
    Views
    15,983

    No I need the zero-based index of the item that...

    No I need the zero-based index of the item that has been selected. Thats why I used GETCURSEL. btw am using a drop down list style combobox..



    lResult = SendMessage( // returns LRESULT...
  20. Replies
    14
    Views
    15,983

    I know its lame...but I badly need to get the...

    I know its lame...but I badly need to get the combobox to work...I have looked on the net for hours without success...most examples found are for ownerdran combo boxes...can anyone guide my search?
  21. Replies
    5
    Views
    1,325

    if(!one) printf("Cannot open file"); This...

    if(!one)
    printf("Cannot open file");

    This should do..But still I wonder how you can open a stream to file without #include <fstream>
  22. Replies
    14
    Views
    15,983

    Get current selection from combobox

    I cannot get the value of the item selected in a combobox.....
    whats wrong? is it the integer number? should it be a pointer, an array?
    I tried it all but non seems to work





    switch...
  23. Replies
    2
    Views
    1,519

    one way to monitor button click, any others?

    I figured one way of doing it...by using a flag and setting its status when the checkbox has been clicked

    I used this code in the case WM_COMMAND




    case chk1:
    {
    ...
  24. Replies
    2
    Views
    1,519

    Check state of buttons

    I used this code to get the state of a checkbox but it only check for its state as the window is intialised...So I wonder how to make it get the state each time the function contain the SendMessage...
  25. Replies
    8
    Views
    3,966

    So thats what you mean I think: ...

    So thats what you mean I think:




    while( TRUE )
    {
    MSG msg;

    if( PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) )
Results 1 to 25 of 37
Page 1 of 2 1 2