Beginners - April 2011 (Page 20)

Bumpkins of Bumpus problem
 
i am sure that everyone is familiar with this question I just seem to be having trouble with my loops not functioning properly I am also using a boolean se...
[no replies]
mass suicide game
 
Hi,,, The problem is the following mass suicide "game": n people, numbered 1 to n, are sitting in a circle. Starting at person 1, a handgun is passed. After m p...
[4 replies] Last: Maybe the topic "mass suicide game" wasn't the best choice. How about ... (by Mathhead200)
by rrataj
how to execute programs
 
Can someone tell me how to run programs. I have windows, and we have to use SSH and c++. He went over it with us in class, but only for mac, not windows. If som...
[5 replies] Last: rrataj He said something about ./a.out Try "./a.exe" or just "a" ... (by Mathhead200)
How to destory the link list?
 
#include <iostream> using namespace std; const short unsigned int NUMVALS = 10; struct ListNode { int value; ListNode* next; }; ListNode* head...
[5 replies] Last: Line 18: ListNode::recursiveDelete(head); (by Mathhead200)
Queue Class Template
 
I was given a class Queue that I needed to modify to serve as a class template for a generalized Queue class. I also needed to modify the driver program to te...
[1 reply] : I find something unusual in your code - the line #6 in the main file. ... (by userulluipeste)
Writing binary with ofstream.
 
Hello all, I'm trying to write( serialize? ) a structure to a binary file. I've found many things searching on google but I'm obviously not understanding the...
[5 replies] Last: Thanks for your responses. I think I'm going to go the boost route as ... (by EmilyRossi)
no match for 'operator='
 
Hi, im new to c++ and im coming across a problem where i am trying to add a class to an array, here is my code, its a bit mombo jombo because i had to remove so...
[15 replies] Last: naraku you were right, i had replaced a different case print message (... (by Makarintosh)
by yev
ifstream >> int stops working after one number
 
Hi, I'm trying to read a text file containing hex numbers into an int array using ifstream. for example, text file looks like this: 0000006f ffffff22 00000...
[1 reply] : ffffff22 looks too large for a signed 32bit integer (by Bazzy)
how to implement the changePatient() function
 
I have to create a program that enable insert of patient record and edit patient record when prompt. The two function suppose to read data from and write data t...
[1 reply] : The object that you use to both read from and write to a file is an "f... (by Computergeek01)
Problems with tutorial program
 
Hello all, I've been going through the c++ tutorial and got to the point with classes. After reading the text, I look at the program examples and then try to...
[2 replies] Last: Oh...thanks mate! And I just realized my program makes no sense lol. (by BananaCode)
by tonnot
Again, from map iterator to 'natural' element order ?
 
I have this map : map "a",1 map "d",1 map "e",1 map "w",1 I use an iterator to any purpose. Ok, I have my iterator located or pointing to item "e", the 3rd ele...
[1 reply] : map iterators aren't random access, why would you need that? You can s... (by Bazzy)
Can anyone point me in the right direction of study?
 
Ok I am creating a hang man game, this is my first game. But anyways On line 77 i am using a random number i earlier generated to access this random word in...
[no replies]
by tburke
C++ file sorting program
 
I am having to write a program that reads in two files (file1.txt and file2.txt) and sorts them into a master file (report.txt.). File1 is NOT sorted and file2 ...
[no replies]
problem in filehandling
 
hi,i have a doubt regarding file handling.can anyone tell me if we can access files stored in our drives through file handling?
[1 reply] : Yes. That is what file handling is for. Read this: http://cplusplus... (by Disch)
Help!
 
Somehow my program keep printing the scalene triangle even when I put equilateral triangle or isosceles triangle =( Is it because of my formula or syntax? ...
[1 reply] : Syntax. if( side1 == side2 != side3 ) says to compare side1 to side2... (by jsmith)
by tonnot
How to use the map_iterator as map index ?
 
I use a map_iterator.lowerbound to find a value. If I have the next 'first' values 1 7 8 9 map_iterator= mymap.lower_bound(1); gives me 1...
[2 replies] Last: map iterators support operator++ (both forms) for incrementation and o... (by jsmith)
VC++ and MySQL
 
Hi there, Im trying to develop an application on windows as a windows form. I need it to display results from a MySQL table and post form content to mysql as ...
[2 replies] Last: Iv managed to link mysql.h successfully. But im not unsure how to con... (by tex0gen)
Clearing the cache for a random number?
 
Hi all, I currently have the code; cout <<"//Computer's turn!" << endl; computerPick = rand () % 1 + 25; system ("PAUSE"); if (co...
[7 replies] Last: The shuffle makes more sense to me, but how can I use pointers to brin... (by Jonnyisonfire)
switch (default)
 
#include <stdio.h> #include <conio.h> int main() { int a,b; int c; printf(" ilk sayıyı giriniz ; \n "); scanf("%d",&a); printf(" ...
[2 replies] Last: coder777 Ah, okay. thank you. ;) (by bluesky44)
by tonnot
Cannot write a function pointer into a class implementation file
 
I have a MainWindow class with ther .h and cpp files. Compiler tells me : argument of type 'void (MainWindow::)(long int)' does not match 'void (*)(long in...
[10 replies] Last: No, I think you are not understanding the main problem. If both clas... (by tonnot)
April 2011 Pages: 1... 1819202122... 55
  Archived months: [mar2011] [may2011]

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