General C++ Programming - July 2012 (Page 26)

Help with linked lists
Im really trying to get this subject down, but every-time i think im learning i try something on my own and end up bombing the problem. Could someone please sho...
Jul 6, 2012 at 7:40am
[3 replies] Last: Think of it as a chain. You can not simply jump to the middle of a lin... (by closed account o1vk4iN6)
by xDJ23x
Reducing Fractions
Program is supposed to be able to add, subtract, multiply, and divide fractions. Everything works well but now I am trying to get the program to reduce the frac...
Jul 6, 2012 at 3:50am
[5 replies] Last: Got it to work, kbw. This is the route I went. Thanks again for your h... (by xDJ23x)
Doubly Linked List
What I'm after here is for some input on my class definitions and if you think I'm might be missing something that wouldn't make these criteria work: System is...
Jul 6, 2012 at 2:55am
[no replies]
hash table data structure
I'm building a simple hash table using division method with size as divisor (ie. key % size ) with separate chaining using doubly linked lists (so I have an arr...
Jul 6, 2012 at 1:03am
[1 reply] : I was immature about my comment and it has been reported (by myself) a... (by closed account 4ET0pfjN)
Selective Inclusion of Device Classes
I am trying to architect a generic C++ application that is able to support different sets of hardware devices. I was planning on writing generic wrappers for s...
Jul 6, 2012 at 12:13am
[1 reply] : DLLs are what you're asking for - put the implementation in there and ... (by NGen)
Can SFML play animation gifs?
Does it support the use of .gif files in 2D Game programming? Also, does anyone know how to get SFML working on Visual C++ 2010?
Jul 5, 2012 at 11:52pm
[4 replies] Last: I think allegro supports it through an addon, which is still kind of s... (by ResidentBiscuit)
Problems with glScalef
I am trying to use glScalef using variable defined values, and something is not working. When I use: float var = 4; glScalef(2/var, 0.0, 0.0); which is id...
Jul 5, 2012 at 10:40pm
[5 replies] Last: Thanks, that works. (by DeadEli)
deadline timer - wait every 5 seconds on the hour
I want to use Boost Deadline timer for a thread that will basically do work every 5 seconds. Simple enough, this is done. However, this thread will be spawned...
Jul 5, 2012 at 10:00pm
[4 replies] Last: WOW, I guess I'm having "fatal LCD staring from cube" syndrome. That'... (by clanmjc)
SDL Problem
Hello everyone, I'm currently recreating the first level or mario using the SDL library for practice. Here's my project (Code::Blocks file) http://www.sends...
Jul 5, 2012 at 9:38pm
[2 replies] Last: Thanks, it works now. (by Gator F)
endl
Hi. I know <<endl flushes the buffer, and moves to the next line. what does <<endl<<endl do when entered like this. is this why this code says mary's name has ...
Jul 5, 2012 at 8:52pm
[3 replies] Last: I think there's a joke somewhere about forgetting to null-terminate yo... (by ResidentBiscuit)
Building simple hash table
I have this helper function to return truth value of whether a duplicate itm exists before insert into list but it crashes. It's hardcoded insert, but I just wa...
Jul 5, 2012 at 7:54pm
[4 replies] Last: I tried to code the bool is_duplicate function in main and it works, s... (by closed account 4ET0pfjN)
Base class determining derived classes size?
Obviously if you have a function that calls sizeof( this ) on any class it will return the number of bytes that class uses based on how many member variables ex...
Jul 5, 2012 at 7:47pm
[5 replies] Last: Exactly what I ended up doing, thanks. (by codingshark)
How to return 2 variables ?
Hi, my question is how to return 2 variables, one integer and one double, from a function ? (pseudocode) i have a function : int fun(){ int x; dou...
Jul 5, 2012 at 7:29pm
[5 replies] Last: In this case, int y; y = fun().first; could also be int x; dou... (by Cubbi)
by Rodan
Seg fault while allocating stream buffer
Hello, I'm having trouble reading a bmp file header into a buffer that I've allocated for it. For the purposes of this assignment, I'm not allowed to use cs...
Jul 5, 2012 at 6:28pm
[7 replies] Last: That is intended, I don't want to manipulate anything in the buffer st... (by Rodan)
WinSock - Going from TCP to UDP
I've made a multiplayer game using a TCP connection. Although there isn't any lag when I run the server and client on the same computer, my friends say it lags ...
Jul 5, 2012 at 5:23pm
[6 replies] Last: dw, I solved it. I needed to do this in FD_READ: int szClientAddr = s... (by closed account 2NywAqkS)
"How Do I" create RPG in C++ w/o graphics
Hello, I am in Intro C++ class & I have to create a "RPG" (role play game). I am having some challenges. I have already created a few different variations tr...
Jul 5, 2012 at 2:56pm
[15 replies] Last: Well a function isn't a control structure, really. Control structures... (by MrHutch)
by CMarco
Vector of vectors
Hello to all, I have a vector of strings and i want to put this vector of strings inside another vector, so I do: std::vector<std::string> vect_aux; // my...
Jul 5, 2012 at 12:08pm
[5 replies] Last: Hi, Thanks... sorry, code tags will be use from now on. Regards... (by CMarco)
strange output
Hello.Take a look at: #include <iostream> using namespace std; int main() { int a = 2, b = 2; cin >> a, b; cout << a << ' ' << b << ' ' <<b/a...
Jul 5, 2012 at 11:53am
[5 replies] Last: Oh, sorry, got it. Very tricky code indeed! Thank you (by hooshdar3)
Read Files?
I am creating a program that calculates day, time, and month, year, as well as minutes using C++. The Seconds are supposed to be pulled out of a text file. For ...
Jul 5, 2012 at 8:49am
[4 replies] Last: On line 29 you permanently keep overwriting seconds . The stream det... (by coder777)
Class Deriving Question
I'm a bit of a n00b when it comes to class deriving, so bear with me in this problem. What if I want a class called sprite like this: //Not necessarily p...
Jul 5, 2012 at 8:31am
[17 replies] Last: "favour composition over inheritance" Sprite would mean to fit better... (by Hypersion)
July 2012 Pages: 1... 2425262728... 30
  Archived months: [jun2012] [aug2012]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.