How do you cross-compile libraries like SVL (Simple Vector Lib) or SDL_gfx for Linux/ARM cpu when you're on Win 64? I'm using "arm-none-linux-gnueabi-gcc" to compile my stuff, but I have no idea how to do it with external libs. Spent last 7 days googling, but no luck so far.
...
Possible Duplicates:
C++ OpenSource project for beginner programmer?
Open Source C++ projects for beginners
Hi guys, I'm a C++ beginner, I have been reading C++ Primer recently. While I'm getting a basic understanding of the syntax, I want to find a small, but well designed opensource C++ project, in which I can learn some d...
Hi,
I'm currently using CMake to build a project, and I have the following problem:
I have a library, say 'C', that the files for an executable 'L' need to use (the files in L call on headers from the library in C)
Both the library and the executable have to be built in the same project, and though they both go through CMake fine, th...
I know how to stimulate clicks using User32 SendInput method and what I need is a similar User32 method but to obtain the current mouse button state.
Something similar to:
public static extern bool GetCursorPos(ref System.Drawing.Point lpPoint);
Function GetCursorPos gives me the current cursor position. What I need is the left butto...
I'm trying to pull the two components out of a timeval struct and place them into strings.
I'm not having much luck with this. I've attempted casting and converting first to a long and then to a string. I need the most efficient way to do this.
Any ideas? I do NOT want to convert to another data structure first (localtime, etc). I need...
Hello. When I declare int weight and then input a double value 165.1 a 2nd cin >> height; doesn't work and there is no any error message. Can you tell me why?
VS2010 Console Application used.
#include <iostream>
using namespace std;
const double lbs_to_kg = 2.2046, inches_to_meter = 39.370;
int main()
{
int weight, height;
...
In C++ using Windows32 using windows socket library using UDP is there a way to give a client routing information to another client to establish a connection between clients without having to route through the server
Clarification:
server - waits for computers and gives routing info - a detached server
client - sends a ack request and ...
Hey, so basically I have this issue, where I'm trying to put an equation inside of a function however it doesn't seem to set the value to the function and instead doesn't change it at all.
This is a predator prey simulation and I have this code inside of a for loop.
wolves[i+1] = ((1 - wBr) * wolves[i] + I * S * rabbits[i] * wolves...
Suppose I have a class Image. At some point in parsing, "Image" is read in at the appropriate time, meaning I want to create an object of class Image.
What I'm considering is mapping these strings to a constructor call to the appropriate class, but I'm not sure how to accomplish this.
I.e.
container.push_back( some_map[stringParsedI...
I'd like to mimic a .NET class signature (and possibly some major pieces of implementation) in a C++ application. I plan on releasing said application under the Boost Software License. Specifically, I'd like to use the TimeSpan and DateTime interfaces, as well as some implementation I found using the handy dandy Reflector tool.
Would us...
I want to implement a function with OpenGL to render a cylinder in C++. The signature of my function is as follows:
#define POINTS_NUM 15
#define DEMESION 3
void drawCylinder( int slices, int segments, GLfloat (&vertices)[ POINTS_NUM ][ DEMESION ] );
I want to use a reference to a two-dimensional array to limit user input, but so...
As documented:
"If not all tabs can be shown at once, the tab control displays an up-down control so that the user can scroll additional tabs into view."
http://msdn.microsoft.com/en-us/library/bb760550%28VS.85%29.aspx
I don't want this. I don't want an up down control to show if I have too many and I don't want multiline tabs. I...
What is meaning of using the second parameter with a comma in the below code?
int *num = new int[25,2];
...
My definition of powerful is ability to customize.
I'm familiar with gcc I wanted to try MSVC. So, I was searching for gcc equivalent options in msvc. I'm unable to find many of them.
controlling kind of output
Stop after the preprocessing stage; do not run the compiler proper.
gcc: -E
msvc: ???
Stop after the stage of compilation pr...
I have an image displayed on screen which is undistorted via cvInitUndistortMap & cvRemap (having done camera calibration), and the user clicks on a feature in the image. So I have the (u,v) pixel coordinates of the feature, and I also have the intrinsic matrix and the distortion matrix.
What I'm looking for is the equation of the 3D l...
What are benefits of using these operators instead of implicit casting in c++?
dynamic_cast <new_type> (expression)
reinterpret_cast <new_type> (expression)
static_cast <new_type> (expression)
Why, where, in which situation we should use them? And is it true that they are rarely used in OOP?
...
Here we go,
I'm trying to implement the command design pattern, but I'm stumbling accross a conceptual problem.
Let's say you have a base class and a few subclasses like in the example bellow :
class Command : public boost::noncopyable {
virtual ResultType operator()()=0;
//restores the model state as it was before command'...
Hello,
I am working in the communication between two programs, one in C++ and the other in Java, connected using standard sockets. Both programs run under UNIX (Ubuntu) within the same machine and share information for a period of time in regular basis. At some point of the execution and always at the same point it gets stuck since the ...
Is it preferred to define inline methods like:
// math.h
class Math
{
public:
inline static int sum(int a, int b)
{
return a + b;
}
};
or
// math.h
class Math
{
public:
static int sum(int a, int b);
};
// math.cpp
inline int Math::sum(int a, int b);
{
return a + b;
}
and why? Is there any difference?...
I'm currently porting some windows code and trying to make it available for use in Ubuntu. The project was originally compiled in VC++ without any issues. Also I should note that this only needs to work in Ubuntu, but more platform independent ideas are certainly welcome.
Most of the code is easy to port as it is mostly a numerical simu...