C++ on Stack Overflow and Game Dev

1 answer

I have the newest version of libglib2.0-dev. But still, why do I get the “Dependency is not satisfiable: libglib 1.2 (>=1.2.0)” error?

I am trying to install Netdude. I tried "sudo apt-get install libglib2.0-dev" and I got "libglib2.0-dev is already the newest version." But when I try to install netdude_0.1.0-1_i386.deb, I get the ...

1 answers | 1 min ago by rajesh on Stack Overflow stackoverflow.com
7 answers

Codechef practice question help needed - find trailing zeros in a factorial

I have been working on this for 24 hours now, trying to optimize it. The question is how to find the number of trailing zeroes in factorial of a number in range of 10000000 and 10 million test cases ...

7 answers | 3 mins ago by manugupt1 on Stack Overflow stackoverflow.com
0 answers

c++ error in glActiveTexture

I am new to C ++. Not that type of information you may need, so I will put what, think that can be helpful. details: Eclipse Platform. Version: 4.3.1. c++ dialect: c++11. OS: GNU/Linux. I am ...

0 answers

C++ Monte Carlo portfolio Pricer

I'm developing a portfolio option pricer using Monte Carlo, but I have encountered a problem. My program compiles and runs. Then I have the out of range vector when the program has to compute the ...

0 answers

c++ Access data from multiple sources

Is there an API that would allow me to access and modify data stored in multiple different sources, i.e. SQL database, web service, plain-text, etc.. I have so far written an pure abstract class ...

0 answers

LLVM tutorial 3.6 linker error when trying to compile output from chapter 8

I am working through the llvm tutorial: http://llvm.org/releases/3.6.0/docs/tutorial/index.html The code from chapter 8 compiles just fine and emits the IR however I am unable to compile the emitted ...

1 answer

Drawing large text with GLUT?

I have created a tic-tac-toe game for school, and I am basically finished. The only thing I have left is that when someone wins, I want a box to pop up on the screen and to say in big text "X Wins" or ...

1 answers | 12 mins ago by byurocks23 on Stack Overflow stackoverflow.com
2 answers

Multiply Large Strings in Array C++

Here I've got a SafeArray(not that safe but my teacher said it's fine) class and a bigint class. My bigint class can add and subtract just fine but when I try the multiply function it doesn't print ...

2 answers | 15 mins ago by jack on Stack Overflow stackoverflow.com
0 answers

No compiler warning for returning a reference to local variable

Using g++ -Wall -ansi foo.cpp I get the warning foo.cpp:31: warning: reference to local variable ‘x’ returned from the function int &bar(int x) { return x; } but, removing that ...

25 mins ago by Ali on Stack Overflow stackoverflow.com
1 answer

C++ - Read input file and store and calculate statistics

I posted a question on this topic earlier when I was beginning the problem. Since then, I have worked on the source code and filled in a lot of blanks. I have experiencing some troubles now, because ...

1 answers | 26 mins ago by Mary on Stack Overflow stackoverflow.com
1 answer

Unavailable Ui properties

I've been trying to implement a project in C++ using Qt Creator – this is Qt Creator 3.3.1 (opensource) based on Qt Creator 5.4.1. I use Ubuntu 14.04. I've found some tutorials of which the subject ...

1 answers | 26 mins ago by Bartosz on Stack Overflow stackoverflow.com
1 answer

using derived class in runtime c++

this is checking in runtime if mybase class is a derived class. I need to call a member variable from say myDerived.member1 using myBase like myBase.member1 in runtime. Here myBase is a pointer. How ...

3 answers

Using C-string: “address of stack memory associated with local variable '' returned”

I am not a C programmer, so I am not that familiar with C-string but new I have to use a C library so here is a shortened version of my code to demonstrate my problem: char** ...

3 answers | 30 mins ago by khajvah on Stack Overflow stackoverflow.com
1 answer

Shader Storage Block vs Uniform Blocks

I've read now, that you can't write to uniform blocks, so shader storage block has an advantage over uniform blocks. Furthermore the size of a shader storage block (the upper limit) is much higher. ...

1 answers | 31 mins ago by user1767754 on Stack Overflow stackoverflow.com
5 answers

Multiplication algorithm

I'm searching for an algorithm to multiply two integer numbers that is better than the one below. Do you have a good idea about that? (The MCU - AT Tiny 84/85 or similar - where this code runs has no ...

3 answers

Parsing strings in C++ by multiple delimiters

I have a string object that is something like: string test = " [3, 4, 8, 10, 10]\n[12]\n[12, 10,\n 20] " And am trying to parse it into the 3 separate arrays equaling [3, 4, 8, 10, 10], [12], and ...

3 answers | 33 mins ago by user3376740 on Stack Overflow stackoverflow.com
1 answer

“Already Open” error on new connection in Asio

I'm using the non-Boost version of Asio and have made a TCP server based on the code at http://think-async.com/Asio/asio-1.11.0/doc/asio/tutorial/tutdaytime3.html I can establish a connection to the ...

1 answers | 36 mins ago by FauxBestaan on Stack Overflow stackoverflow.com
6 answers

How to know if a word in a string has digits?

The question I have: How can you tell if a word in a string has a digit in it or not? What I need to do: write a program that reads in a line of text and outputs the line with all the digits in all ...

6 answers | 38 mins ago by urallsad on Stack Overflow stackoverflow.com
0 answers

opencv FindCountour crash the program

I am new to image processing, and I'm working on a real time tracking But I am stuck by the findcountour function. cvtColor(*pImg, *pImg, CV_RGBA2GRAY); //convert to gray image Mask = ...

3 answers

letter getting cutt off when I use a counter in do while loop c++

I'm trying to use a counter in my do while loop but if i do it cuts off the first letter of my getline in the first iteration Here is the do while loop.. do { cout << "Enter the name of ...

3 answers | 46 mins ago by noobex on Stack Overflow stackoverflow.com
3 answers

Sorting Dynamic Array With Data File

I have an assignment in which I have to read from a file called ("random.txt") output the total and copy the file into an array dynamically. Then sort the values in the file. Up until line 20 my ...

3 answers | 58 mins ago by Adnan Sheikh on Stack Overflow stackoverflow.com
0 answers

Boost.serialization unregistered class exception with serialized class defined in a runtime-linked shared library

I am trying to create a modular game system, and I would like user - defined classes to be able to be serialized. To to this, I am placing classes derrived from a polymorphic base class. I am running ...

2 answers

Can't get by “DllMain already defined” error

I'm trying to write a .dll library for .dll injection purposes. And because of this fact, it must have a routine called DllMain, since this is what will be used as the entry point. I think my ...

0 answers

Decode RSS characters (WP8.1/AppStudio)

I've made a simple RSS Reader using AppStudio for Windows. The problem is my RSS Feed xml contains some characters that need to be decoded in order to be properly fetched by my application. To be ...

0 answers

Defining protocol commands using Google Protobuf

I'm working on a project implemented only in C++ where I need to define approximately 30 to 40 different commands or messages to be sent between systems over TCP. I am considering using unions or ...

1 answer

ArrayStoreException error with JNI and another thread

I'm attempting to read frames directly from a video file by using JNI and decoding the frames in native code, passing them back as a raw 3 byte BGR array. I'm also using jvmti's SetTag and GetTag to ...

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

Reliability of having arithmetic shift in c++ when targeting x86

So according to the c++ spec The value of E1 >> E2 is E1 right-shifted E2 bit positions. If E1 has an unsigned type or if E1 has a signed type and a non-negative value, the value of the result ...

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

Perform default scrolling behavior, when user drags listview item over its scrolbar

INTRODUCTION: I am not native English speaker, and I am not very experienced programmer either. I have met a problem that I have a hard time describing, so please bear this in mind while reading ...

0 answers

MPI - How to avoid using two buffers in a non-blocking send & receive?

I have a use-case where I need to transmit an Array of Structures (AoS) among a group of processors in a circular ("ring") fashion. I do that currently by using a non-blocking send and receive, and ...

2 answers

Assigning value to returned shared_ptr doesn't behave as expected

I have a private three dimensional vector of shared_ptr<Room> objects as follows: private: vector<vector<vector<shared_ptr<Room>>>> world; In the same class, I ...

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