C++ on Stack Overflow and Game Dev

1 answer

cURL displays SSLv3 instead of TLSv1

Why does cURL 7.19 display SSLv3 during handshake if SSL is disabled by curl_easy_setopt function? curl_easy_setopt(m_curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1); cURL output: CURL Info: ...

1 answers | 2 mins ago by Alex on Stack Overflow stackoverflow.com
0 answers

Multithreaded multiple socket send/recv simultaneously

I'm building a really basic proxy server into my pre-existing HTTP server. Incoming connections are added to a queue, and a signal is sent to one thread in another queue of waiting threads. This ...

1 answer

warning: left-hand/right-hand operand of comma has no effect

I have these warnings and I don't know how to solve them. warning: left-hand operand of comma has no effect warning: right-hand operand of comma has no effect Code: size_t cCsvAlias::operator [] ...

1 answers | 8 mins ago by Lex Alex on Stack Overflow stackoverflow.com
1 answer

Removing the first specified type found from a nested pack

For example, using NestedPack = Pack<long, char, double, Pack<long, int, short, int>, char, int>; Then RemoveFirstFoundFromNestedPack<int, NestedPack>::type is supposed to give ...

1 answer

How do I make the ball move in a certain direction?

I want to make my player, make the ball move in a certain direction, roughly 120 degrees up. At the moment the ball goes in al direction, but the ball goes up not down. The ball also goes at 4 ...

1 answers | 13 mins ago by Milan H on Stack Overflow stackoverflow.com
0 answers

Store coordinates from mouse events, Open source project “Longomatch”

Been a while everyone, many thanks for the help in my earlier projects, I'm currently using (not developing) an open sourced project called Longomatch. As a junior C+ is not something I'm really ...

1 answer

Unresolved external symbol on signals

I was trying to make QLCDNumber clickable, by inheriting a new class from it. All it does is define a mouseReleaseEvent(QMouseEvent *e) sending a clicked() signal. I think my code is correct, but it ...

1 answers | 16 mins ago by William RENOU on Stack Overflow stackoverflow.com
5 answers

Count sequences of letters in a string - C++

I'm working on a simple substitution-cipher decoder. I'm using frequency analysis to decrypt the ciphertext. Just looking at the frequency of unique letter isn't enough. I need to look at the ...

1 answer

C++ Boost spirit, parse a 2D array (and more) into a struct

I am trying to modify the following example : http://www.boost.org/doc/libs/1_57_0/libs/spirit/example/qi/employee.cpp I would like to add a 2D vector in the employee struct, such as : struct ...

1 answers | 25 mins ago by waffle on Stack Overflow stackoverflow.com
1 answer

Declaring the templates in c++

// stdafx.h // stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, but // are changed infrequently // #include "targetver.h" ...

2 answers

Storing numbers in unkown sized array (and count some values)

I'm writing a program to calculate some values of an array of unknown size. I successfully made it so the user can input 5 numbers to be calculated. But I want the user to be able to enter them as a ...

2 answers | 33 mins ago by MarkBear34 on Stack Overflow stackoverflow.com
1 answer

Ubuntu CMake what path to add to CMAKE_MODULE_PATH

My OS is Ubuntu. I would like to change from QT4 to QT5 in my project. The native package though is 4.x version in Ubuntu right now. I have downloaded the Linux installer from QT homepage and ...

1 answers | 37 mins ago by BuddhaWithBigBelly on Stack Overflow stackoverflow.com
0 answers

Cmake and QT5 - Include only takes one argument

coming from this topic: Ubuntu CMake what path to add to CMAKE_MODULE_PATH I try to get QT5 in my project running, as QT4 does not allow me to include QWebView. Following the guides from the ...

1 answer

JNI: RGB565 Bitmap to Grayscale - how to pass in JNI changed data back to Java?

In JNI I have a pointer to an 8-bit integer array (uint8_t*). I want to pass its data to Java part. My problem is, that data in array must be in uint_8 format, because I achieved it as colour ...

1 answers | 42 mins ago by witcher on Stack Overflow stackoverflow.com
3 answers

Implementation of assignment for classes

So I was going through a piece of text in C++ and came across the following piece of code: class example { int dataMember; public: example& assign(const example& source) { ...

3 answers | 45 mins ago by Akshay Arora on Stack Overflow stackoverflow.com
0 answers

Tricky bugs in refacored pong from sfml examples

I am learning SFML by pong example. Original code can be found there. I am trying to put this lines in a function and then make a call: sf::RenderWindow window( sf::VideoMode( gameWidth, ...

0 answers

Process terminated with status -1073741571 (0xC00000FD)

I am trying to implement simple inversions problem in C++ using mergesort. But for the second day I am receiving this error. Although everything looks fine, Debugger just stops and throws the ...

2 answers

Using auto and decltype for making a function return the type of its class. How can I make it return a value, instead of a reference?

I am trying to make a generic, purely virtual Matrix class that supports methods that return a mew Matrix. Of course, if one of those methods is used on a subclass of Matrix it should return something ...

0 answers

Dynamic Constantbuffer or Dynamic Vertex Buffer in c++ and DX11

I have a question realted to meemory usage by using Dynamic ConstantBuffer vs Constant Buffer updated frequentlky(Using Defualt usagetype) vs Dynamic Vertex Buffer I always Defined Constnat buffer ...

1 answer

Why is this counter increasing in this way and not one by one in this divide and conquer algorithm?

I was reading an algorithm solution to the following problem: This file contains all of the 100,000 integers between 1 and 100,000 (inclusive) in some order, with no integer repeated. Your task ...

10 answers

minimum c++ make file for linux

I've looking to find a simple recommended "minimal" c++ makefile for linux which will use g++ to compile and link a single file and h file. Ideally the make file will not even have the physical file ...

10 answers | 1 hour ago by RichieHH on Stack Overflow stackoverflow.com
1 answer

Why my code with OpenMP performance different on different environment?

I'm a newcomer to use OpenMP. These days I optimized a program and got different results on different environment. The kernel of my code looks like this: #pragma omp parallel for for (int thread_id = ...

0 answers

WinRT - how to display Metro dialog box on a desktop app?

I believe this could be possible somehow because Windows PE loader already does it: I tried directly creating an Windows.UI.Popups.MessageDialog class and instancing 'ShowAsync' but it fails with ...

2 answers

gtkmm, how can I make my program waiting the clicked signal from a button?

I want to make my program waiting until a button is clicked. The problems are, I can't use trhead I can't use a dialog or another window I cant't use a function like Glib::usleep() because it makes ...

0 answers

Can I allow opening windows from everywhere in Qt?

I have the following situations where I would like to display some widgets. My main windows is mostly a text editor. I have an action called 'Run', which interprets the text and does something. One ...

0 answers

Order of multiple file processing in C++

I am trying to combine all the integers of two separate files into a third file, then sort all the integers in the third, all in one script. The logic I'm working with is below Read file 1 and 2, ...

3 answers

Error: vector does not name a type

I'm having lots of errors in my final project (a poker and black jack sim). I'm using a vector to implement the "hands" in the blackJack class, and I'm using a structured data type declared in another ...

3 answers | 1 hour ago by Chris De Bow on Stack Overflow stackoverflow.com
2 answers

Add forward slash to string

I want to make a string "test/" but I can't add the slash after the initial string. Any idea why and how? string imgpath="test"; strcat(imgpath,"/"); This is what I've tried so far. I get Error ...

2 answers | 1 hour ago by George Irimiciuc on Stack Overflow stackoverflow.com
2 answers

Why isn't my MenuItem clickable?

I've got a MenuItem with a label and a callback set, and it still isn't working, what do I need to do? Menu* menu = Menu::create(); Label* lbl = Label::createWithTTF("My Label", "fonts/Marker ...

2 answers

Limiting the number of arguments in a variadic function

So I've been working on a function class, and by default, I can do this, and it works: int main(){ function f("x^2+1"); cout<<f(3)<<endl; return 0; } "assume proper includes ...

2 answers | 1 hour ago by blackbeltJR on Stack Overflow stackoverflow.com
15 30 50 per page
1 2 3