General C++ Programming - March 2011 (Page 20)

by aiby
static in class
 
Hi guys, I have question in my Convert class,my code as below: #ifndef _CONVERT_ #define _CONVERT_ #include <iostream> using namespace std; class Conv...
[5 replies] Last: There was some discussion some time ago. One of the conclusions was th... (by simeonz)
Sorting linked list first by last name then by firrst name
 
Hello, I Have a function sort in my program (below) that takes in linked lists and inserts them sorted. I have the function working 100% by last name but when ...
[9 replies] Last: Thanks filipe! I didn't know it worked like that. (by closed account D80DSL3A)
by gerben
problem compiling program using comparison with pairs
 
Hi fellow c++ users. I'm puzzled why the following doesn't compile. I define a smaller than operator (<) on complex<double> and use it in a pair. But it doesn'...
[2 replies] Last: Hey man, mucho thx! (by gerben)
by amo
Help with k arm bandit problem
 
Hello, My friend and I are working on the k arm bandit problem using a upper confidence bound however we don't think the program is properly computing the upper...
[2 replies] Last: Thanks for the reply and advice. I moved the declarations out of the l... (by amo)
by Gldnbr
Something wrong with templates
 
I'm trying to program a simple add/remove program using templates as well. I'm very new to templates, so please help me out here. ERROR: unable to match fu...
[11 replies] Last: Nice ;) Mark it as solved if you think your problem is solved. (by naaokth)
by Disch
Inheriting from std::iostream
 
So I'm reconsidering the idea of making an abstracted File + Filesystem lib primarily geared towards adding functionality standard libs lack and adding support ...
[18 replies] Last: http://www.amazon.com/Standard-IOStreams-Locales-Programmers-Reference... (by PanGalactic)
Pointer to an array of pointers to a structure
 
Hi, I have an abstract class like this: class Obj { public: virtual int someFunc()=0; protected: struct A { ...
[12 replies] Last: You could do this then: class Obj { protected: struct A { int... (by simeonz)
Variable Dimension Array
 
Finally, after months of putting this project off, I figured out a simple algorithm that makes the resize function work! I tested it and was overjoyed to see it...
[2 replies] Last: Anyone? (by PiMaster)
Looking for code to stop at a program at a certain time.
 
Impatient neophyte to C++. Just learning and naturally impatient so working on program. Not a lot of writeup on dealing with " time " in an easily understandab...
[4 replies] Last: Thank you! I hadn't even gotten around to considering that I needed s... (by jim3222)
Creating a C++ program
 
I need a program for this following: Create a program that will ask for an input number and provide a menu that displays the following: (a) Square root (b) C...
[2 replies] Last: Did your tutor teach you to write code like this? What do you want us... (by closed account zb0S216C)
by codist
tearing opengl
 
I have an OpenGL application. When I try to draw a multi-color triangle, it tears. How do I fix that? A timer would work where it calls the draw function 60 ti...
[8 replies] Last: I don't think wglSwapIntervalEXT is supported by my hardware. Is there... (by codist)
Segmentation fault error
 
I am trying to run this program but it is giving me a segmentation fault error. Any ideas would be appreciated!! Thanks! #include<iostream> #include<vecto...
[6 replies] Last: When you get a segmentation fault, use Debug/Step Into. It will show y... (by Athar)
call stack for no reason
 
#include <iostream> #include <WinSock2.h> #include <mysql.h> #include <string> #include <vector> #include "action.h" using namespace std; MYSQL *con...
[1 reply] : It is common in the Microsoft runtime, when memory is allocated in a d... (by Moschops)
Can someone explain what wrappers are?
 
I've googled them, but I'm still not sure I fully understand what they are. I've heard people talk about them, so I am just curious.
[1 reply] : It's just a thin layer of software that "wraps" the API to a lower lay... (by jsmith)
Using Semaphores?
 
Hello people, having a problem to allocate a new semaphore with an initial count of 0 in this program? The finished program will have the score print out as it ...
[no replies]
Programming structure
 
I need a programming structure whereby a factory interface creates instances of a class defined in another module. For example, dll-1 Defines the factory in...
[2 replies] Last: Thank you hamsterman.. never thought from that point of view. (by ashwinvbs)
can't make a break in this array..
 
Problem is : Write a program to assign seats on each flight of airline's only plane(capacity : 10 seats). If the person type 1, then your prog...
[no replies]
Generic Resource Management
 
I am writing some auxiliary classes for the game engine I want to create with SFML. I want to write generic resource management code so I can then use mostly th...
[2 replies] Last: OK. I've made some changes to the Resource Manager code. I removed the... (by anonymous23323124)
Memory management in a program?
 
Okay, let's just say I created a very large console application.... Okay, it's a dungeon crawler, and before you spit on the ground before me, I realize the pro...
[7 replies] Last: Console game - 128 MB. Ok :) You can use memory pools to decrease fra... (by simeonz)
Delete Nodes from a linked list
 
For my program I have to enter commands followed by expressions the commands are: insert (insert names/phone numbers/emails into the list alphabetically) loo...
[5 replies] Last: Okay I have it now where I can remove any node BUT the first one, When... (by tkauffman2)
March 2011 Pages: 1... 1819202122... 31
  Archived months: [feb2011] [apr2011]

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