General C++ Programming - October 2012 (Page 36)

Input without stopping program flow?
 
I was wondering if it was possible to get console input without stopping the program flow, i dont really know how to explain this but like with cin doesnt it wa...
[1 reply] : iskeypressed() http://www.cplusplus.com/forum/general/5304/#msg23940 ... (by Duthomhas)
Seg Fault in BST Insertion
 
When I call the following binary search tree insert function with the function call insert(root, "apple"), the compiler seg faults. Is there an explanation?...
[2 replies] Last: I got it. I forgot to allocate dynamic memory. (by edison84)
error LNK2019: unresolved external symbol in multifile project.
 
Hello! I'm running into some problems with my program. I've done some research and it seems to me like I'm doing everything by the book, but I must be missin...
[2 replies] Last: Ahh... makes sense. I'll just revert everything to the way it was befo... (by scorlibrian)
Insert string in BST
 
Could anyone come up with code to insert a string into a binary search tree?
[no replies]
Doubt regarding size of class and inheritance
 
First the code: class A { int x; public: char y; }; class B: public A { public: int c; }; int main () { A a; B b; cout << "\na "...
[11 replies] Last: Okay. That does explain it. Is there anywhere I could read up on that ... (by Nisheeth)
by sabi20
Need help with generating random numbers
 
I need to generate random numbers between 100 and 999 this is what i got but this doesn't work every time. It goes over 999 sometimes #include <iostream> ...
[1 reply] : The modulus operator is resolved before addition in the order of opera... (by scorlibrian)
struct dereference operator
 
given typedef struct ex1 { int i; void* p; }struct_ex1; is (struct_ex1)->i equivalent to struct_ex1.i ?
[2 replies] Last: (*struct_ex1).i is equivalent to struct_ex1->i Given that struct_... (by maeriden)
Bot in c++
 
I would like a list of tutorials or a list of the parts of what i need to make a bot for a mmorpg, its a simple game with not much security. its turned based s...
[no replies]
MACROS in C not C++
 
I have this homework, if you think I am asking you to answer my homework and you are uncomfortable with it, feel free to ignore this request: I am to use C...
[4 replies] Last: Well, it would help if you tell us the errors. You could also take a l... (by ne555)
by paetim
Need help with Shipping Charges!
 
I am having trouble getting the final total amount correct, what am I doing wrong? please help! A shipping company calculates charges based on parcel's weigh...
[1 reply] : There are a few problems with this. Take a look at you total_charge f... (by pogrady)
by HJH
How to find '@" in a string
 
I have a mail.dat list which contains three different emails and some other comments. I know how to use inFile.open("mail.dat"). What I want to do is use the fi...
[2 replies] Last: http://cplusplus.com/reference/string/getline/ http://cplusplus.com/re... (by closed account DSLq5Di1)
A bit complicated calculation...
 
Hey guys, I am trying to figure out how to write a program that will output "What is your name? Sam Your name score is: 23" Something like that. ...
[17 replies] Last: Thank you, I think i understand the codes! Looking forward to work on... (by sampark85)
Help with having to enter values twice.
 
I have some code that is giving me fits. I need to check that the data entered by the user is an integer between 0 and 10. This code is broken because the user ...
[2 replies] Last: I found out the issue. I was doing cin >> value twice. Once on l... (by enosmac)
by rollie
Is there a write-biased lock available for boost::shared_mutex?
 
Is there a type of write lock available on a boost::shared_mutex that will block future read locks until the write lock has successfully obtained the lock and r...
[no replies]
Merge Sort Crashing
 
/*Program to perform Merge Sort*/ #include<iostream> using namespace std; void mergesort(int ,int,int); void merge(int ,int,int,int); void mergeso...
[1 reply] : On line 26, I believe k should be initialized to p . You should al... (by cire)
Date and time keeping
 
Hey everybody, Im going to start working on a program that relies heavily on one second ticks along with keeping track what day it is. I was wondering on how i...
[3 replies] Last: Ninja!!! (by Stewbond)
Binary files!! Comparing...
 
Greetings! I'm making a program to store the records of a school/university and i'm saving the data to a binary file.(Default binary file = database.inl, can...
[1 reply] : When the program is running, you can keep track of the number of recor... (by kbw)
by ilker
stack overflow - urgent
 
Hi, I have written following data for my thesis and yet it gives stack overflow error. Could anyone can help please? is there a way to handle this problem??? ...
[19 replies] Last: If you build with debug symbols, it will be able to tell you which lin... (by Moschops)
add cubed numbers
 
#include <iostream> using namespace std; int main () { for (int x = 1; x <= 14; x++) { cout << x*x*x << endl; } ...
[3 replies] Last: You're welcome (by Stewbond)
by pyfgcr
Class function does not link
 
I'm trying to create a class with some function about file, like this: pes.h #ifndef PES_H; #define PES_H const unsigned BUF_SIZ=1024; class File_element ...
[3 replies] Last: Oh I forget. I delete lines for you guys easier to see. I compile it ... (by pyfgcr)
October 2012 Pages: 1... 3435363738... 50
  Archived months: [sep2012] [nov2012]

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