|
GCC+Eclipse?
I have not used either, but have heard it is not bad, and can work together.
Igor Green
http://www.grigsoft.com
Compare It! + Synchronize It! : Files and folders comparison never was easier!
|
|
|
|
|
yeah ther are two compiler i caome across
->DevShed C++ compiler
--> GNU compiler
or serach http://www.cpp-home.com for compiler
-----------------------------
"I Think It will Work"
Formerly Known As "Alok The Programmer" at CP
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Hi,
The Microsoft Visual C++ compiler is available for free and can be downloaded at:
http://msdn.microsoft.com/visualc/vctoolkit2003/
A preview of the upcoming Visual C++ 2005, coming with a complete graphical IDE can be gotten at:
http://lab.msdn.microsoft.com/express/visualc/default.aspx
Cheers.
--
Maxime Labelle
maxime.labelle@freesurf.fr
|
|
|
|
|
You can download the MS Visual C++ 2003 toolkit from microsoft here[^]. It's free, and includes the same C++ compiler distributed with Visual Studio 2003.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
GCC comes in two versions for windows, cygwin, and mingw.
http://www.cygwin.com/
http://www.mingw.org/
I've used the latter, though not much. Either will work, check them both out as there are differences that might matter to you.
By "free graphical develop" what do you mean?
|
|
|
|
|
Hey guys...How would I go about writing this in the .cpp file?
MOSTLY THE BOOL METHODS I AM HAVING TROUBLE WITH
This is what I have for the Menu.h file
#ifndef CONNECTFOUR_H
#define CONNECTFOUR_H
#include "Menu.h"//includes Menu header file
using namespace std;
class ConnectFour
{
private:
//date members
int board[12][13];
int numChips[7];
public:
ConnectFour();
//default constructor
bool playTurn();
/*gives a player the opportunity to place a chip into the board. This should be a Boolean function to return true if this turn produces a winner (otherwise false should be the return value).*/
void displayBoard();
/*places 2 different kinds of markers on the board (one for each player) and displays some kind of marker for empty slots. Be sure your choices are easy to see.
*/
void dropChip();
//places a chip into the board and looks for a winner
void checkWinner();
//should call 4 helper functions (you choose the names) to check the 4 possible winning moves – 4 in a row vertically, horizontally, or diagonally. These helper functions should look only at possible wins produced by this last move – they should not check the entire board!
void verticalwin();
//this method checks to see if 4 colors match to win the game vertically
void horizontalwin();
//this method checks to see if 4 colors match to win the game horizonatally
void diagonalwin1();
//this method checks to see if 4 colors match to win the game diagonally one way
void diagonalwin2();
//this method checks to see if 4 colors match to win the game diagonally the second way
bool determineDraw();
//method determines if the game is a draw (full board with no winner). This method returns true if the game is a draw and false if not.
};
#endif //ends ConnectFour.h
All I have left for my ConnectFour.cpp is ...
#include <iostream>
#include <string>
#include "ConnectFour.h"//includes ConnectFour header file
//default constructor will initialize zero to the data private members (variables)
ConnectFour::ConnectFour()
{
board[12][13] = 0;
numChips[7] = 0;
for(int i=0; i < 12; i++)
{
for(int j=0; j<13; j++)
{
board[i][j] = 0;
}
}
for(int i=0; i<7; i++)
{
numChips[i]= 0;
}
}
bool ConnectFour::playTurn()
{
}
|
|
|
|
|
You have to return a value in the bool-Method.
return true;
Hardy.
|
|
|
|
|
Hello,
void verticalwin();
void horizontalwin();
void diagonalwin1();
void diagonalwin2();
I think these functions should also return boolean datatypes, like determineDraw function.
If you will do this, you can just check if any of these functions returned a true value. And hence, determine if there has been a winner.
maybe like this:
bool ConnectFour::playTurn()
{
// TODO:
// Get the column input here
return (verticalwin() || horizontalwin() || diagonalwin1() || diagonalwin2());
}
|
|
|
|
|
Hey guys...How would I go about writing this method in the .cpp file?
MOSTLY THE BOOL METHODS I AM HAVING TROUBLE WITH
This is what I have for the Menu.h file
#ifndef CONNECTFOUR_H
#define CONNECTFOUR_H
#include "Menu.h"//includes Menu header file
using namespace std;
class ConnectFour
{
private:
//date members
int board[12][13];
int numChips[7];
public:
ConnectFour();
//default constructor
bool playTurn();
//this method give a player the opportunity to place a chiop inot the board
void displayBoard();
/*this method places 2 different kinds of markers on the board(one for each player)
and displays some kind of marker for empty slots.*/
void dropChip();
//this method places a chip into the board and looks for a winner
void checkWinner();
//this method calls 4 helper functions to check the possiable 4 winning moves.
void verticalwin();
//this method checks to see if 4 colors match to win the game vertically
void horizontalwin();
//this method checks to see if 4 colors match to win the game horizonatally
void diagonalwin1();
//this method checks to see if 4 colors match to win the game diagonally one way
void diagonalwin2();
//this method checks to see if 4 colors match to win the game diagonally the second way
bool determineDraw();
//this method determines if the game is a draw
};
#endif //ends ConnectFour.h
All I have left for my ConnectFour.cpp is ...
#include <iostream>
#include <string>
#include "ConnectFour.h"//includes ConnectFour header file
//default constructor will initialize zero to the data private members (variables)
ConnectFour::ConnectFour()
{
board[12][13] = 0;
numChips[7] = 0;
for(int i=0; i < 12; i++)
{
for(int j=0; j<13; j++)
{
board[i][j] = 0;
}
}
for(int i=0; i<7; i++)
{
numChips[i]= 0;
}
}
bool ConnectFour::playTurn()
{
}
|
|
|
|
|
So, what exactly is the problem? Does code compiles? or what?
ARSALAN MALIK
|
|
|
|
|
Here's a bit of code that automates the VC6 debugger, what's the VC7 version look like ?
void Debug()
{
HRESULT hResult;
DSSharedObjects::IApplicationPtr pIDevStudioApp;
DSDebugger::IDebuggerPtr pIDebugger;
DSSharedObjects::IDocumentsPtr pIDocuments;
DSDebugger::IBreakpointsPtr pIBreakpoints;
_bstr_t bstrTemp;
if(SUCCEEDED(hResult = pIDevStudioApp.CreateInstance(__uuidof(
DSSharedObjects::Application))))
{
pIDevStudioApp->PutVisible(VARIANT_TRUE);
if(((pIDocuments = pIDevStudioApp->GetDocuments()) != NULL) &&
((pIDebugger = pIDevStudioApp->GetDebugger()) != NULL) &&
((pIBreakpoints = pIDebugger->GetBreakpoints()) != NULL))
{
bstrTemp = _T("Program.exe");
pIDocuments->Open(bstrTemp);
pIDebugger->Go();
...
}
}
}
|
|
|
|
|
void Debug()
{
HRESULT hResult;
CComPtr<envdte::_dte> spIDevStudioApp;
CComPtr<envdte::window> spMainWindow;
CComPtr<envdte::debugger> spIDebugger;
CComPtr<envdte::breakpoints> spIBreakpoints;
CComPtr<envdte::_solution> spSolution;
CComPtr<envdte::project> spProject;
CComBSTR bstrTemp1 = _T("VisualStudio.DTE.7.1");
CComBSTR bstrTemp2;
if(SUCCEEDED(hResult = spIDevStudioApp.CoCreateInstance(bstrTemp1,NULL,
CLSCTX_LOCAL_SERVER)))
{
if(SUCCEEDED(hResult = spIDevStudioApp->get_Debugger(&spIDebugger)))
{
spIDevStudioApp->get_MainWindow(&spMainWindow);
spMainWindow->put_Visible(VARIANT_TRUE);
spIDevStudioApp->get_Solution(&spSolution);
bstrTemp1 = _T("C:\\Temp");
bstrTemp2 = _T("Program.sln");
spSolution->Create(bstrTemp1,bstrTemp2);
bstrTemp1 = _T("Program.exe");
spSolution->AddFromFile(bstrTemp1,VARIANT_FALSE,&spProject);
spIDebugger->get_Breakpoints(&spIBreakpoints);
spIDebugger->Go(VARIANT_FALSE);
}
}
}
|
|
|
|
|
I want to know which method can be applied to communicate between two computers belong to the different domain besides SOCKET
|
|
|
|
|
What's wrong with sockets?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I want to if two computers belong to different domains and A has authority of administrator of B,whether A can write data in the shared writable directory of B
|
|
|
|
|
If A has administrator authority of B, then A can write to a shared writable directory on B.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
i have a uni assignment that requires multi-threading. I want to call a function to begin the thread that takes several parameters. I have found examples on how to pass single parameters and tried to pass several param's in the same manner.
I am using _beginthread(functionName, 0, parameters);
Does anyone know of a way that i may be able to pass several parameters to this thread??
Thanks
Steve
|
|
|
|
|
err... make a struct that holds them and past that? Thats what I do.
|
|
|
|
|
|
HHOOK hKeyHook;
__declspec(dllexport)
LRESULT CALLBACK KeyEvent (int nCode,WPARAM wParam, LPARAM lParam)
{
if( (nCode= HC_ACTION) && ( (wParam = WM_SYSKEYDOWN) || (wParam = WM_KEYDOWN) ) )
{
KBDLLHOOKSTRUCT hooked *= *((KBDLLHOOKSTRUCT*)lParam);
DWORD dwMsg;
dwMsg += hooked.scanCode <<16;
dwMsg += hooked.flags << 24;
char lpszName[0x100] = {0};
lpszName[0] = '[';
int i= GetKeyNameText(dwMsg,(lpszName+1),0xff) +1;
lpszName[i] = ']';
printf(lpszName);
}
I want to hook the keyboard but the KBDLLHOOKSTRUCT struct keeps giving error even with the intelisense showing the members of the struct.
I dont really get it
Here are the errors
error C2065: 'KBDLLHOOKSTRUCT' : undeclared identifier
error C2059: syntax error : ')'
among other stupid errors.
Can anyone help me?
Tks in advance
|
|
|
|
|
This line is incorrect:
<br />
KBDLLHOOKSTRUCT hooked *= *((KBDLLHOOKSTRUCT*)lParam);<br />
Change it to:
<br />
KBDLLHOOKSTRUCT* hooked = (KBDLLHOOKSTRUCT*)lParam;<br />
This should clear up the errors.
Regards,
-John
|
|
|
|
|
Also, your IF statements are goofed up...
Which immediately lets me know you did not turn your warning level to 4 or you are ignoring WARNINGS during your mopile, because the compiler would otherwise warn you about "Assignment within conditional expression".
Try changing this:
if( (nCode= HC_ACTION) && ( (wParam = WM_SYSKEYDOWN) || (wParam = WM_KEYDOWN) ) )
to this:
if( (nCode == HC_ACTION) && ( (wParam == WM_SYSKEYDOWN) || (wParam == WM_KEYDOWN) ) )
I usually try to place the contant on the left hand side, because such code will NOT compile if you made such a similar error:
if( (HC_ACTION == nCode) && ( (WM_SYSKEYDOWN == wParam) || (WM_KEYDOWN == wParam) ) )
Since your IF is wacked, you are probably processing messages you should not be, at times.
|
|
|
|
|
I have figured out how to spy on an apps menu for remote control, but cannot determine how to do the same for the apps context menus.
How do you determine the commands sent from a context menu?
|
|
|
|
|
You can call TrackPopupmenu with TPM_RETURNCMD , and it'll return the menu item id. You may also want to take a look at TPM_NONOTIFY .
--
Arigato gozaimashita!
|
|
|
|
|
I actually need a command I can track in Spy++ don't I? I'm actually coding in C++. From what I can tell, these are C# functions.
As an example of what I need to do, I want in my program, to fire off a simulated right click to say a notepad window, and command "paste" at a specified position using the context menu.
The program I will actually be doing this with does not have a standard menu command for what I need to do, and this is only available in a context menu.
|
|
|
|