I considered your suggestion about the static variables and instead passed the string to the function again. That solved the problem. Thanks
Type: Posts; User: Sober
I considered your suggestion about the static variables and instead passed the string to the function again. That solved the problem. Thanks
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<<"...
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...
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....
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...
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).
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...
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.
Well thank you for your advice on fgets.
I modified to the following :
#include <stdio.h>
#include <stdlib.h>
int main()
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...
Thank you very much. Now I can manage.
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...
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...
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
Great .Thanks. I didn't thought declaring static variables for a function would make such a difference..
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...
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...
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...
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...
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?
if(!one)
printf("Cannot open file");
This should do..But still I wonder how you can open a stream to file without #include <fstream>
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...
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:
{
...
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...
So thats what you mean I think:
while( TRUE )
{
MSG msg;
if( PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) )