cikara21 37 Posting Whiz

what is this?..

#define number 3
//...
--number;

let me introduce "strcpy"

strcpy(char *_destination, const char *_source);

are u sure that is bubble sort?..

cikara21 37 Posting Whiz

If you had read any of the previous posts, you would have seen this point:

I don't have problems with that..

cikara21 37 Posting Whiz

u can use

FindFirstFileW(...,...);

and dont forget
WIN32_FIND_DATAW
cikara21 37 Posting Whiz

in the source file..u can just go..

#include<string>
#include...
#include"someheader.h"
#include"anotherheader.h"

and remove #include<string> in the "someheader.h"
cikara21 37 Posting Whiz
char  gradeLetter [4] = {'a', 'b', 'c', 'd'};

what do u think...

int gradeLetter [4] = {'a', 'b', 'c', 'd'};
cikara21 37 Posting Whiz
while(0 < 1)
{
       stream_out<<"a ";
}
cikara21 37 Posting Whiz

what do u mean?...

cikara21 37 Posting Whiz
dim x as integer
dim y as integer
dim str as string

private sub ON_BUTTON_CLICK(...sender as OBJECT,... e as MOUSE_EVENT_ARGS)
    x = e.X
    y = e.Y
    str = ListView1.GetItemAt(x, y).Text
end sub
cikara21 37 Posting Whiz

post header files...please...

cikara21 37 Posting Whiz
cikara21 37 Posting Whiz

try

#include <iostream>

//...or

using namespace std;

//...
cikara21 37 Posting Whiz
cikara21 37 Posting Whiz
cikara21 37 Posting Whiz

your problems is..

bool Solver::Solve()
{
     //...........
     else // stuck?
     {
      if(trys != b)
      {
          it++; // another iteration
          Solve(); //-------------------- [B]HERE [/B]----------------------//
      }
      else  // stuck and nothing happend? unsolvible...
           return false;
    }
    //............
    if(trys != b) // you did somthing, try again
    {
        it++;
        Solve(); //-------------------- [B]OR HERE[/B] ----------------------//
    }
}
cikara21 37 Posting Whiz

post "Sudoku.txt" please...:)

cikara21 37 Posting Whiz

use..

//...
fflush(stdin);
system("pause");
//...
cikara21 37 Posting Whiz

try to replace

system("pause');

with..

cin.ignore();
cikara21 37 Posting Whiz

try

//----------------------------------------------------------------------------
//...
private: System::Int32 m_x, m_y;
//...
//----------------------------------------------------------------------------
ON FORM1 MOUSE MOVE
{
    m_x = e->X;
    m_y = e->Y;
}
//----------------------------------------------------------------------------
ON TEXTBOX1 MOUSE LEAVE
{
    toolTip1->Hide(this);
}
//----------------------------------------------------------------------------
private: System::Void textBox2_MouseHover(System::Object^  sender, System::EventArgs^  e) 
{
    if( radioButton4->Checked )
    {
         toolTip1->Show("Hello",this,m_x,m_y);
    }
}
//----------------------------------------------------------------------------
cikara21 37 Posting Whiz

ur using 32 bit compiler rit...

see this...

__int64 arry[201];

// in 32 bit compiler will be
int arry[201];

// maks array size = 65535

__int64 arry[2000000];

// ?????
cikara21 37 Posting Whiz

Yeay...maks array size is 65535 or 65536...i dont know exactly...

cikara21 37 Posting Whiz

both of them...
ex:

//-------------- <file1.h> -----------------//
#include <iostream> //..header file
class CClass
{
        //...
        void funct(std::string &str);
};
//-------------- </file1.h> -----------------//

//-------------- <file1.cpp> -----------------//
#include "file1.h" // header file
//#include <...h>
void CClass::funct(std::string &str)
{
       //...
}
//...
//-------------- </file1.cpp> -----------------//

//-------------- <main_source_file> -----------------//
#include "file1.h" // header file

int main()
{
      CClass c_class;
      //...
      return 0;
}
//-------------- </main_source_file> -----------------//
cikara21 37 Posting Whiz

congratulations...:)

cikara21 37 Posting Whiz

Of course you can always make your own linked list cikara21 but if you are using VC++ why should you? When you can have this instead http://msdn.microsoft.com/en-us/library/he2s3bh7.aspx

of course...Just trying to help...:)

cikara21 37 Posting Whiz

Here...hope u can read it...:)

//##########################################
#pragma once

struct LinkList
{
	int a;
	LinkList *Link;
};

namespace "Link" {

	using namespace System;
        //....

        public ref class Form1 : public System::Windows::Forms::Form
	{
              //...
              private: LinkList *new_link;
              //...

              private: System::Void Form1_Load(System::Object^  sender, System::EventArgs^  e)
	     {
                  //...
	          list = new LinkList;
		  list->a = 2;
                  //...
	     }
             //....
        };
}
//##########################################
cikara21 37 Posting Whiz

Still, I didn't managed to solve it :( . My question remains: how can I pass a variable to the function that it's executed when my button is pressed. I want (if it's possible) to do

TestBtn->OnClick = myfunction(parameter);

???

...?...
it's "Not an allowed type", :( ...Sorry...:)
...!...

void __fastcall TForm1::OnClick1(TObject *Sender)
{
         ShowMessage("Button1 clicked");
}

void __fastcall TForm1::OnClick2(TObject *Sender)
{
         ShowMessage("Button2 clicked");
}

void __fastcall TForm1::OnClick3(TObject *Sender)
{
         ShowMessage("Button3 clicked");
}

//... repeat until "void __fastcall TForm1::OnClick10(TObject *Sender)"...

//######################################
for (x = 0; x < 10; x++)
{
    TestBtn[i] = new TButton(this);
    TestBtn[i]->Parent = this;
    switch(i)
    {
        case 0:
            TestBtn[i]->OnClick = OnClick1;
        break;
        case 1:
            TestBtn[i]->OnClick = OnClick2;
        break;
        case 2:
            TestBtn[i]->OnClick = OnClick3;
        break;

        //... repeat until case 9..
   
    }
    TestBtn[i]->Caption = "My button " + IntToStr(x);
    TestBtn[i]->Top = 100;
    TestBtn[i]->Left = 100 + 10 * x;
}

try it...

cikara21 37 Posting Whiz

try yhis...

//######################################

class TForm1:public TForm
{
    //...
    public:
        TButton *TestBtn[10]
    //...
};

//######################################

for (x = 0; x < 10; x++)
{
     TestBtn[i] = new TButton(this);
     TestBtn[i]->Parent = this;
     TestBtn[i]->OnClick = myfunction;
     TestBtn[i]->Caption = "My button " + IntToStr(x);
     TestBtn[i]->Top = 100;
     TestBtn[i]->Left = 100 + 10 * x;
     m_x = x;
}

//######################################
cikara21 37 Posting Whiz
class TForm1:public TForm
{
      private:
           // create temp var..
           int m_x;
      //...
};

void __fastcall TForm1::myfunction1(int x)
{
     ShowMessage("Button " + IntToStr(x) + " clicked");
}

void __fastcall TForm1::myfunction(TObject *Sender)
{
     myfunction1(m_x);
}

//######################################

TButton *TestBtn = new TButton(this);
TestBtn->OnClick = myfunction;
TestBtn->Parent = this;

for (x = 0; x < 10; x++)
{
    TestBtn->Caption = "My button " + IntToStr(x);
    TestBtn->Top = 100;
    TestBtn->Left = 100 + 10 * x;
    m_x = x;
    TestBtn->OnClick(this/*sender*/);
}
//######################################
cikara21 37 Posting Whiz

try..

SetWindowTextA(edit,"TEST");
or
SetWindowTextW(edit,L"TEST");
cikara21 37 Posting Whiz
cikara21 37 Posting Whiz
TestBtn = new TButton(this);
TestBtn->Parent = this;
TestBtn->Caption = "Check";
cikara21 37 Posting Whiz

send a message...receive a message...??
what device?...

cikara21 37 Posting Whiz
//...
void __fastcall TForm1::example(void)
{
     TestBtn = new TButton();
     TestBtn->Visible = false;
}
cikara21 37 Posting Whiz

a little help...

class A
{
	int valueA;
	class B
	{
		int valueB;
	public:
		B(){}
		B(int x):valueB(x)
		{
			std::cout<<"Class B"<<std::endl;
		}
		int get_value()
		{
			return valueB;
		}
	};
public:
	A(){}
	B b;
	A(int x):valueA(x),b(x)
	{
		std::cout<<"Class A"<<std::endl;
	}
	void display(void)
	{
		std::cout<<"Value B "<<b.get_value()<<std::endl;
	}
	
};

int main()
{
    A a(99)
    a.display();
    return 0;
}
cikara21 37 Posting Whiz
cikara21 37 Posting Whiz
class A
{
    public:
        int function1()
        {
              return 1; // ...
        }
};
class B
{
    A a;
    public:
        int function1()
        {
             return a.function1();
        }
};
cikara21 37 Posting Whiz
//...
if (enhp < 1)
    break;

enhp = enhp-random_integer;
//...
cikara21 37 Posting Whiz
Form2 ^form2 = gcnew Form2();
form2->Show(this);
cikara21 37 Posting Whiz

post something that needed... Stash::fetch(...???...)

cikara21 37 Posting Whiz

or....

int binary_search(int arry[], int size)
{
	int first = 0;
	int last = size - 1;
	int middle = 0;
	int key = 0;
	cout<<"What number would you like to search for in the arry : ";
	cin>>key;
	for(;first<=last;)
	{
			middle = ((first)+(last)) / 2;
			
			if(arry[middle] > key)
				last = middle-1;
			else if (arry[middle] < key)
				first = middle+1;
			else 
			    return middle;
	}
	std::cout<<"??? Not found\n";
	return -1;
}
cikara21 37 Posting Whiz

this is binary search algorithm...hope u understand this...

int BinarySearch(int arr[], int value, int low, int high) 
{
       if (high < low)
           return -1; // not found
       int mid = (low + high) / 2;
       if (arr[mid] > value)
           return BinarySearch(arr, value, low, mid-1);
       else if (arr[mid] < value)
           return BinarySearch(arr, value, mid+1, high);
       else
           return mid; // found
}
cikara21 37 Posting Whiz

aye...g luck..

cikara21 37 Posting Whiz

i mean...
something like this one...

//... 1
myGame.deal();
myGame.showdown();
//... 2
myGame.deal();
myGame.showdown();
mrboolf commented: thanks for making me notice this :) +2
cikara21 37 Posting Whiz

can i get the different result every time i deal???...

cikara21 37 Posting Whiz
//... memcpy...
//... use memcmp(...,...,...);

//...
//...to compare two string :
int s_compare(const char *str1, const char *str2)
{
        if (strlen(str1) != strlen(str2))
		return 1;
	for (;*str1!='\0';*str1++,*str2++)
		if (*str1 != *str2)
			return 1;
	return 0;
}

// what's this...??
if ((cmd[0] == "M") && (cmd[1] == "S") && (cmd[3] == "G"))
{
       PA_OutputText(1, 1, lineNum, packets); //show on DS screen
}

// maybe, if (cmd[0] == 'M')
cikara21 37 Posting Whiz

let me tasted.....:)

cikara21 37 Posting Whiz

create this class...

class Age
{
    //...up to u..:)
};

class Height
{
    //...up to u..:)
};

class Weight
{
     //...up to u..:)
};

class Person
{
     //...up to u..:)
};
cikara21 37 Posting Whiz

<iostream> just like it...

cikara21 37 Posting Whiz
Person::Person(std::string _name)
{
         //...
}
cikara21 37 Posting Whiz
char T[25];
fgets( T,25, stdin);

work fine with my cmplr...

cikara21 37 Posting Whiz

Library: Use User32.lib, make sure link correctly..