Beginners - November 2012 (Page 17)

Beginner Trouble - While Loop Requiring Multiple Instances of Input to Return Value
 
Hello all, I've just started learning C++ this last weekend. Currently, I'm trying to develop a series of interconnected menus/screens as a template for a v...
[3 replies] Last: Ah, thank you so much for the answer and advice. Evidently, I haven't... (by Aerodyne09)
reading and writing files
 
I will prepare files of “random” integers for you. The numbers will be stored 1 per line. Your program will: Prompt the user for the name of the datafile...
[14 replies] Last: That would meant that I wouldn't allow the user to enter the file name... (by nyaeggy)
Pointer issue crashing program
 
Hey guys, One line of code keeps crashing my program and I can't figure out why. It has something to do with a segmentation fault (or so I'm told). ...
[13 replies] Last: You passing redLine by value and it get copied. *head pointer is copie... (by MiiNiPaa)
by xzbit
about fopen
 
i know that this is how to open a file in C FILE * pfile; pfile = fopen("C:\\sample.txt", "r"); .... but what if i want to write a file and i dont want it to...
[1 reply] : You want a temporary file. (by Nexius)
Using strings
 
I am trying to save questions to a vector and I have declared the vector as a string but the program does not work if I enter more that a word. Am I declaring t...
[2 replies] Last: Thanks meeram, that did it and learned a lot about vectors tonight (by arcticman452)
Array (1,2)
 
hello i have done this work and id like to check my work plz if its correct I have to modify this program so that it also asks the user to enter a number...
[26 replies] Last: Dude just email your instructor as ask what they mean by that. Other t... (by jlillie89)
Word Wrap Function not working..
 
This function is meant to insert a newline character only after a full word (does not cut a word in half) but before the max width is reached. I have to use poi...
[no replies]
Unresolved external error
 
Ok guys another one. This looks good to me but can't quite figure out what this error message means. Here is my code #include <iostream> #include <string> ...
[3 replies] Last: declaraction and definition syntax not matched for the binSrch functio... (by meeram)
Program crashing for no apparent reason
 
Guys I believe everything is right here but for some reason my program stops working everytime i try to run it Any suggestions THANKS! #include <iostream> ...
[2 replies] Last: Thanks that did the trick (by JBIRD304)
Hello,Here is C++ code. I want to know how can I call classes by "if else". Thanks in advance.
 
#include <stdio.h> #include <conio.h> #include <iostream> using namespace std; //***************************************************** Global variable****...
[2 replies] Last: In the if...else, use something like the below book a; a.addbook(); ... (by meeram)
Help with restarting a program
 
Hey guys, So i was bored and decided to make a calculator however ive ran into a problem when the user has finished calculating a sum it will re run from beginn...
[5 replies] Last: Thank you very much meeram! (by Adiminium)
Input data into a vector
 
I am trying to write a program where some of the input is stored into a vector but when I compile what I have so far for the program, I get an error that says "...
[2 replies] Last: Thanks, took a little playing with but I did get it to work using push... (by arcticman452)
by h4344
How can i wait for a "key up" event?
 
My problem is in my code i use the Sleep function to prevent users from holding the key too long and toggling certain parts of the program from off too off agai...
[3 replies] Last: It cannot toggle off and then on in the same press. You should process... (by Duthomhas)
by NOP
How can I get the hex value of a string?
 
For example, if dat == "dl2beu", then how could I put "646C32626575" in buffer? If it helps, dat is a string that will always be 6 chars, and buffer is also a ...
[5 replies] Last: Or the same thing using c-strings #include <cstdio> #include <cstring... (by Chervil)
Read in numbers and calculate
 
Hello guys, beginner here and i was wondering if i could get your guys' help on something im working on. Ive been trying to read in a number(and eventually a bu...
[8 replies] Last: Never mind guys i got it. I used while(inputFromFile << num) instead ... (by programmerj)
Game of life, almost there? Need HELP!!
 
The program we are working on is the "Game of Life". -We have to pull the pattern from the given text file The first line has four numbers the columns and ro...
[no replies]
by khal
Author Separate Chaining
 
Hi, I downloaded the author code online but it does not compile and I don't understand why its not compiling? #ifndef SEPARATE_CHAINING_H #define SEPARAT...
[10 replies] Last: @Moschops Thanks the typename did the trick run perfectly (by khal)
by jc4bs
Having Trouble with a 2-Dimensional Array
 
I am trying to make a program that will simulate Conway's Game of Life. The array that displays the game, a , is 22 cells high and 80 cells wide. I have a seco...
[12 replies] Last: I noticed that on line 174, if I replace the equality operators with ... (by TheIdeasMan)
problem with scissors, paper, stone
 
Hi guys. I cant do this right. Please help me. whatever I type, I always get the loop to repeat. I want the loop to end when i either get sciss, paper or stone...
[8 replies] Last: Mukomo: It works. Thank you all guys for ur help. (by cbeginner89)
vector
 
hi. I would like to code a function which takes a vector of ten numbers as an argument. the function should return the sum of the three largerst numbers.I would...
[6 replies] Last: you make it look so easy!!! I can make it look harder. #include <... (by Catfish2)
November 2012 Pages: 1... 1516171819... 75
  Archived months: [oct2012] [dec2012]

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