Beginners - March 2014 (Page 77)

How to check when the user presses a key
 
Ok, part of my console program gets the user to press enter to continue after reading the introduction of how to use the program. I've halted the program usi...
[4 replies] Last: getch() gets a single character from the console but doesn't print or ... (by nvrmnd)
Writing a getline function
 
I am trying to write my own version of the string class and one of my functions is the getline function. Here is getline: void MyString::getline( istream...
[2 replies] Last: I added a cout statement and it gave me "45". I assume this to be a tr... (by Kyle Lanmon)
by hina
errors??? i am using visual studio when i am making of this header file .cpp file compiler generate error's given below
 
#include<stdlib.h> #include <cstdlib> // Provides size_t #ifndef MAIN_SAVITCH_SEQUENCE_H #define MAIN_SAVITCH_SEQUENCE_H //#include <cstdlib> // Provides si...
[no replies]
Dynamically Allocated Array
 
Hello! I'm writing a simple tic-tac-toe game as a school assignment. Everything worked great, but now the instructor wants us to demonstrate that we can use a d...
[2 replies] Last: Thanks! I never would have been able to figure out the " + '0' " bit. ... (by hinesro)
spacing
 
I want to display all the columns in the same line. #include "stdafx.h" #include <iostream> #include <iomanip> #include <cmath> using namespace std; ...
[1 reply] : If you mean that you want 2 columns, you can't do that using 2 functio... (by SamuelAdams)
by Nukem
Local varibles
 
I am having an issue with my local variables, I do not want global variables. My code works if I have the same variables global but that is not my intent. Coul...
[2 replies] Last: Awesome! Thanks for the help, my only question I am left with is how d... (by Nukem)
Sales in 4 divisions
 
This program will have an array that will hold the sales Write a program that calculates information about sales during a year totals for 4 divisions (North, So...
[2 replies] Last: Fixed that and it worked perfectly thank you (by JonnyBlaze213)
Can't find the error... Please help
 
Write your question here. well I have to do this small program which takes in a couple of user input like, time of day the user called, day the user called and...
[7 replies] Last: I did mean well (always do), and wasn't trying to be condescending, I ... (by TheIdeasMan)
While loop failing with bool
 
For some reason, logical statement in the while loop will not change the bool value when I type in "Y" or "N". It just remains 1, or true, no matter what. ...
[6 replies] Last: You might want to go with a do while in this situation... #include ... (by Nukem)
Problem exiting While loop
 
I am writing a program for programming class. The program involves menus, and it runs just fine. I wanted to add a while loop to bring it back to the beginning ...
[1 reply] : A senior CS major happened to come by and helped, resolved changed to... (by Karmaslapped)
Convertion
 
Hello, I am new this site. It has been about 8 years since I last written any code so I am a bit rusty. I am trying to write a program in C++ that scan...
[2 replies] Last: Thank you very much for taking the time to respond. (by jservay)
Finding errors in Functions! Valid or Invalid
 
Hi, So my class is just learning about functions and how they work. So I have an assignment were I need to find as many errors as possible and correct them, and...
[5 replies] Last: Should I just copy the function into the compiler or make a basic cod... (by TheIdeasMan)
Coverting integers to roman numerals!!! PLZ help
 
Write a program that accepts a year written as a 4-digit Arabic numeral and outputs the year written in Roman numerals. Some important Roman numerals are V for ...
[1 reply] : I just posted what I had at sometime last night, i'll try to work up o... (by DrPatrickBateman)
by hina
how i implement it i am totly confused
 
The insert and attach member functions. There are two member functions to add new items to a sequence. One of the functions, called insert, places a new item ...
[4 replies] Last: void sequence::insert(const value_type& entry) { if (!(size() < c... (by MiiNiPaa)
Replacing a structure in a binary file
 
Hello guys, i'm having a problem with a function in my program. The function is supposed to open a file, ask the user which part of the file they would like to ...
[no replies]
Error in casting char* to Object ...
 
Write your question here. am writing a protocol using socket programming . when I send segments in the sender , I write segment seg = window_buffer.dequ...
[5 replies] Last: I am using protocol GBN (Go Back N) which is using the sequence no. of... (by Mohammed Montasser)
not sure how to do dice roll
 
I am supposed to be making a game similar to risk I have an idea what to do after the dice rolling part but cannot figure that part out. It says 'rollDie' is a ...
[1 reply] : Your question is unclear. Both questions aren't really explaining what... (by MatthewRock)
by wolfv
constant array of constant objects?
 
The following example works but nothing is constant. bPtrs is an array of pointers to BClass objects. How to make bPtrs constant and the BClass objects cons...
[7 replies] Last: Thanks cire. That's perfect. (by wolfv)
nevermind :)
 
I figured it out.
[no replies]
Getting tokenized words into a 2D array
 
The assignment is to take words from a txt file, line by line (using getline), and tokenize each word, keeping count of the total number of words seen, the numb...
[no replies]
March 2014 Pages: 1... 7576777879
  Archived months: [feb2014] [apr2014]

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