Hello guys,
Can anybody help, I'd like to write my own beautiful control, f.e. nonrectangle button (more beautiful). and it will be in another file (dll), for future use.
The biggest problem is, that it will change design (color) when mouse cursor on it))
plz, help
Galym
...
Hello. I'm teaching myself OpenGL and I'm implementing ttf text rendering using FreeType 2. I downloaded the library from
http://gnuwin32.sourceforge.net/packages/freetype.htm
and after a couple of minor issues I got it running properly. The thing that's bothering me is that I have to place a copy of freetype6.dll in the directory w...
Hi everyone,
I implemented the Visitor pattern in C++ using a STL-like iterator for storing the Visitor's current position in the container. Now I would like to change the container while I iterate over it, and I'm especially interested in deleting items from the container, even the one I'm currently visiting.
Now obviously this will i...
Hallo Rudi,
I dont get the error, please can you help me out, here is the .l and .y file.thanks.
%{
#include "ifanw.tab.h"
extern int yylval;
%}
%%
"=" { return EQ; }
"!=" { return NE; }
"<" { return LT; }
"<=" { return LE; }
">" { return GT; }
">=" { return GE; }
"+" { return PLUS; }
"-" { return MI...
I'm investigating ways of using GPU in order to process streaming data. I had two choices but couldn't decide which way to go?
My criterias are as follows:
Ease of use (good API)
Community and Documentation
Performance
Future
I'll code in C and C++ under linux.
...
Hello all
im using one main QNetworkAccessManager that is in singleton class every time some part from the application
that looks like this :
NetWorkService::NetWorkService()
{
manager = new QNetworkAccessManager();
}
QNetworkAccessManager* NetWorkService::getManager()
{
return manager;
}
needs to preform http call it call...
This is a homework, but please give me some ideas, i have no idea what to do. Here's the task:
For given integers N and K (1 <= N, K <= 2000000000) you have to find the number of digits of N^K.
Is there any formula or something ? Because i tried solving it by simply powering N**K but it's not working for large values and the program si...
This code, when compiled in xlC 8.0 (on AIX 5.3), produces the wrong result.
It should print 12345, but instead prints 804399880.
Removing the const in front of result makes the code work correctly.
Where is the bug?
#include <stdio.h>
#include <stdlib.h>
#include <string>
long int foo(std::string input)
{
return strtol(input....
Hi, all.
I've been having a tough time entering input with gdb using XCode or Eclipse. Every time the debugger hits std::cin, it looks like its waiting for input, but fails to accept it. I've scoured the internet for more information, but am having trouble finding anything.
What do I need to do to get cin to work with gdb? For referen...
Hi,
I have a vector of pointers to Mouse objects called 'mice'.
I'm passing the mice to the cat by reference.
vector <Mouse*> mice;
Cat * c;
c->lookForMouse(&mice);
And here's my lookForMouse() member function
void Cat::lookForMouse(vector <Mouse*> *mice)
{
...
}
And now to the problem! Within the function above, I can't seem ...
Hey folks,
Been messing about with this all day and haven't got anywhere so I'm hoping someone can help me - I have a HeapReAlloc method failing with the error ACCESS_VIOLATION, but I'm unsure how to implement a further check using GetExceptionCode as it uses try/catch or exception or something - can someone give me a quick example of h...
Hello,
Is there a way to serialize enums automatically as int? Every time I define a new enum and write
std::stringstream stream;
stream << myenum1;
stream >> myenum2;
the compiler complains that the operators << and >> are not defined. Do you know a way to tell the compiler to treat enums as plain int's?
What makes the problem har...
In our software we have a camera based on mouse movement, and a quarternion at its heart.
We want to fire projectiles from this position, which we can do, however we want to use the camera to aim. The projectile takes a vector which it will add to its position each game frame.
How do we acquire such a vector from a given camera/quatern...
Hello, I don't know if it is possible to do this, but I have tried several ways and nothing seems to work. Basically I need to access the same static member from several files which include the same class definition.
// Filename: S.h
class S {
public:
static int foo;
static void change(int new_foo) {
foo = new_foo;
...
I am working on the implementation of functions for an already written image processing program. I am given explanations of functions, but not sure how they are designating pixels of the image.
In this case, I need to flip the image horizontally, i.e., rotates 180 degrees around the vertical axis
Is this what makes the "image" i am to ...
Hello all
I am trying to achieve the same functionality as multidigimon.exe, that is mapping an input digitizer to a given monitor, I was wondering if there is an API I can access or if the multidigimon.exe supports any parameters I can call it with to automate the mapping process.
So far I have found that multidigimon.exe writes the f...
my English is not good enough to explain my problem. But I will try my best.
I used to be a Java programmer but have been using C++ more than a year. The one thing always bothers me is the strategy of creating business objects from network(like through SNMP, Web Service or other data sources...) and save it to database and load it when...
Where are functions stored in a C++ program?
For example
int abc()
{
//where am I stored?
}
I know that we can take the address of a function, that means functions are stored somewhere in memory. But I have already read at many places that no memory allocation for functions takes place.
I am confused. My question may seem vague...
Here is my implementation file:
using namespace std;
#include <iostream>
#include <iomanip>
#include <string>
#include <stack> //line 5
#include "proj05.canvas.h"
//----------------Constructor----------------//
Canvas::Canvas() //line 10
{
Title = "";
Nrow = 0;
Ncol = 0;
image[][100]; // line 15
position.r = 0;
position...
I have been trying to document my C++ project using Doxygen, with little success: Doxygen to fails recognize certain macros, and consequently entire functions are misinterpreted and most of time does not generate docs even though they have special comment blocks. Case in point:
/**
* \def __MYLIB_FUNCTION_ATTRIBUTE(...)
* \brief ...