General C++ Programming - May 2012 (Page 16)

How do I disable auto-sort for listbox?
 
I'm trying to add strings to a listbox but unfortunately everything that I add to it gets auto-sorted... I found a way to disable it and it is by removing the b...
[no replies]
reading files
 
how can i know number of lines in an input text file during run time so i can make a loop for the same number of lines in the ifstream?
[3 replies] Last: It means "create an object of type string, which is part of the std na... (by Moschops)
Help With Error
 
Hi, My C++ code is supposed to print a calendar for a user inputted year. The bsic functionality is done, and I was working on formatting when I rebuilt and ran...
[1 reply] : Fixed it. I forgot when I swapped in arrays for cases to use months-1 ... (by Chris Christoff)
Position of iterator in vector?
 
Quick question, if I have a vector getting looped through by an iterator, how do I say: if(iterator is at this position in the vector) { do something }...
[17 replies] Last: One more look through standard algorithm realizations and you will kno... (by vlad from moscow)
What is wrong?!?! HELP PLEASE!
 
I am trying to write a code with a switch function. I got it working, but not correctly. I don't know what I am doing wrong. Please help! The code doesn't w...
[2 replies] Last: Thank you. (by Cyle Fangmeier)
by shaggy
Loading levels
 
Hey i was wondering how i could make a menu for my game where i could pick my levels and things. It is made in c++ SDL/openGL. I currently have a player clas...
[14 replies] Last: Writing proper OO code is pretty hard, it's a lot more work than I'm ... (by hanst99)
by anoosh
OpenMP variable evaluations
 
Dear all, This is my first post here. I've just added the OMP capability to my OO c++ code. The code is somehow too complex. However, the results of the s...
[no replies]
graph help please
 
hello. I need help. I got this graph code and it requires a file like a .txt i guess. I am not sure what the file should look like to make it work. I want to ...
[no replies]
swap in queue , enqueue
 
look at this code I want to work program for the clinic will accept patients on the basis of the patient's condition , queue by linked list . this is th...
[no replies]
Proceedures
 
#include <iostream.h> #include <conio.h> #include <iomanip.h> //Declare the main variables int ID,hours,pay1,staff,OT,OTH,GP,NP,i,total; char en...
[6 replies] Last: Oh okay , thanks for the help tremendously I will begin bringing in my... (by edwardnigma)
How to do this with the rand function?
 
You know if I use a rand function in a loop, it may generate the same number twice, how to ensure that it generates distinct numbers? What to add with it. Here...
[3 replies] Last: Okay got it, I will use the array approach. Thanks (by szak1592)
Could I make a game like this in C++?
 
http://i.imgur.com/lYhal.jpg This is Legend of Mana for the Playstation 1. I've wanted to make a game similar to this for a long time. This game feature...
[10 replies] Last: You can do certain offline optimizations, yes, but even if you somehow... (by hanst99)
wRITING DATA IN FILE
 
i have an issue regarding Writing data int binary file. Actually i want the data to be written as Hex. I have my data in an char buffer and i am writing it in...
[6 replies] Last: I really don't know what you want. I've tried to explain that hex is ... (by kbw)
Getting core dump in simple tree program
 
Hi, I was writing simple tree program and getting core dump during the traversal of tree.Could anyone provide me some insight. #include<iostream> using nam...
[3 replies] Last: I don't see a problem in create_tree() , but you should check for NUL... (by ne555)
how to write a code for the read file in .txt?
 
i need some help.. how to write the C++ code to write the file i have save it in .txt file? there any type i can write the code? if i use a function, can all...
[1 reply] : Are you saying that you want to create a program that outputs the sour... (by crystalgem)
One last Function question!
 
My program works great, but I want to put the output in its own function as well (to keep int main() clean. When I set up the function output(), I try to send ...
[7 replies] Last: Okay, I tidied up the code a bit, and I figured I'd share it with ever... (by crystalgem)
Help with a program loop.
 
Firstly, thank you to everyone who helped me in the other thread; I'm really starting to grasp the concepts of calling functions and variables between functions...
[7 replies] Last: Okay, I feel silly now. I was declaring the same variable twice. P... (by crystalgem)
Auto Updating Clock?
 
In the program that I'm slowly building, I have it set to display the current time, at which the program starts but I'd like to have it keep track of time and u...
[1 reply] : > So, is it possible? Yes. The simplest way would be to use a termi... (by JLBorges)
by Algren
No. of People accessing a file
 
I have made a code which runs a chat on the same computer, where all users are logged in on the same machine/server/etc. What is the problem is that i want to s...
[no replies]
Queue Class Template
 
Hi I am having a little trouble implementing a queue class template, this code works fine when it isn't a template class but now gives me LNK2019 errors (ind...
[3 replies] Last: Thanks that solved the problem! /Saad (by blueshift)
May 2012 Pages: 1... 1415161718... 41
  Archived months: [apr2012] [jun2012]

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