General C++ Programming - August 2013 (Page 16)

Building a vending machine using funcs
 
Can any1 help me with my program of creating a vending machine..... it is quarterly done and im new to this so I really need help... we asked to work on the c...
[3 replies] Last: You can either convert the int to a string, or you can do something li... (by manudude03)
copy the middle of 2dim array into another array
 
0 down vote favorite I want to copy the middle of 2dim array into another array. who knows how i can do it. for example I have: int A = {{1, 2} ,{5...
[2 replies] Last: There are many ways to do the task. For example int A = {{1, 2} ,{... (by vlad from moscow)
by a1234z
how to create obj file in dev-c++ 5.4.0
 
Write your question here. I want to create a function and generate .o file and use it in the programs.
[1 reply] : The object file for Dev-C++ is under "Objects/Mingw" in the relative p... (by Computergeek01)
by Daleth
operator[] for unordered_map and map
 
Why don't std::unordered_map and std::map have read-only versions of the subscript operator? At the very least, the read-only version could just call at() ...
[2 replies] Last: Okay, so consistency is a major factor in not having a read-only versi... (by Daleth)
by sujha
functions
 
can be compiled but get wrong output(answer for power consumed) #include <stdio.h> #include <stdlib.h> double HeaterPower(double voltage, double current);...
[6 replies] Last: k..at last,i got it..tq,, (by sujha)
Weird SFML errors
 
I decided to try my hand at SFML while im waiting for lazy foo to finish his tutorials, and im getting some weird errors. im running natty for my os, and am doi...
[9 replies] Last: alright thanks (by closed account Dy7SLyTq)
Please Help!
 
Anyone help me with my project! My prof. asked us to make a simple Bank Management System in a menu driven form! Its ok if it only contains CREATE ACCOUNT,WITHD...
[4 replies] Last: You should learn learn how to store and read info from files. That way... (by Danny Star)
income tax calculator
 
In a country called Codington Income tax is calculated in the following way Typical sources of income of person are his/her Salary and Capital Gains, if any. ...
[3 replies] Last: ^ (by Danny Star)
Ignoring Spaces?
 
Hi! I'm new to this site :D I need help figuring out how I can manipulate certain strings. This program here is supposed to randomly scramble any word/sentence...
[4 replies] Last: The <algorithm> in the standard library has a function random_shuffle... (by keskiverto)
by Ceset
.dll files
 
i have been working on a simple sample about SDL_image.h usage. well then i wondered even though there r many .dll files used on windows. some of the .dll file...
[4 replies] Last: ty all for your answers and Montario79 it was informative so ty (by Ceset)
long long preprocessor
 
Basically I want to use the preprocessor to define LLONG as long long or whatever alternative there is. I've been googling it for a while now and have finally g...
[15 replies] Last: Ah well, I couldn't find anything new in their headers, just __int64 w... (by awsdert)
Painful error with templated template types
 
So hey. We all know that we can do this, right? template<typename T, T Lower, T Upper> class RangeCheckedNumber { /* implementation for a class which warns t...
[11 replies] Last: ne555: that's not only ugly for each variable declaration (picture if ... (by Nafnlaus)
Getting bits in RDX after multiply (x64)
 
Hi Using the old fashioned (unsigned) multiplication instruction in x64 assembly multiplies RAX (64 bit register) by a 64 bit register. The answer is stored in...
[4 replies] Last: ^ Yea, I've been working on a big integer library recently and have fo... (by elohssa)
what is this mean?
 
Write a program that, given a natural number N between 0 and 4999 (inclusively), and M distinct decimal digits X1,X2...XM (at least one), finds the smallest str...
[12 replies] Last: The digits in the set are not positions; {7, 0, 1} means a number with... (by Zhuge)
Which is fastest
 
I know there is a debate about SDL vs SFML and I really don't care which is better over all. I only need one function, and that is putting a 2d array of 32-bit ...
[3 replies] Last: Shaders are custom programs that are executed by the GPU. DirectX and... (by Disch)
Preprocessor and Casting
 
#define zxUCHAR_MIN ((unsigned char)0u) #define zxUCHAR_MAX (~zxUCHAR_MIN) #if zxUCHAR_MAX == 0x7F #define zxCHAR_BIT 7u #elif zxUCHAR_MAX == 0xFF #defi...
[7 replies] Last: unsigned up to short works fine signed up to long/int works fine need ... (by awsdert)
by Ceset
ld.exe||cannot find -lSDL_image
 
i was learning sdl. and following the steps to install SDL_image from this site http://lazyfoo.net/SDL_tutorials/lesson03/windows/codeblocks/index.php and then ...
[10 replies] Last: You obviously haven't visited the Code::Blocks downloads page. They ha... (by Duthomhas)
Is this code efficient? (1,2)
 
Well I was thinking about how I'd implement my 3D model format. I tried to make the model format very simple, and I didn't actually compile it, but I was wonder...
[22 replies] Last: Eh, once school starts in 3 weeks I'll ask my math teacher 'bout it. ... (by closed account N36fSL3A)
Saving info like trees and such in a file
 
Hello guys, I'm intrested in creating programs of games and such which learns while playing and saving the information for further use. For example a tic tac t...
[2 replies] Last: This might help: http://www.cplusplus.com/forum/general/107782/ (by Script Coder)
by huike
reading/writing file on multiple threads
 
I'm currently working on a server for handling clients in a 2d online game and I wrote some regular fstream file code for handling the file that stores their in...
[16 replies] Last: What do you mean by it doesn't scale? It probably comes from this: ht... (by kbw)
August 2013 Pages: 1... 1415161718... 28
  Archived months: [jul2013] [sep2013]

This is an archived page. To post a new message, go to the current page.