Beginners - October 2014 (Page 41)

Keeping high score
 
Hello, I'm new to coding and I have to make a game where it has to keep the best score after playing it a couple times, how do I do this? I already have the cod...
[5 replies] Last: use fstream. and write the score to a file then use that file as input... (by coltehrman)
Need help with this program
 
I'm having trouble with this program. Here's the question. Linda is starting a new cosmetic and clothing business and would like to make a net profit of appro...
[4 replies] Last: I think Linda is being dishonest. So she wants to mark up prices and t... (by tipaye)
on type casting
 
why exactly c++ has kept constriant on void pointers. suppose int a=2; int *p=&a; void *voidpointer=p; int *another=p1; //why we have to explicitly cast...
[1 reply] : The void pointer doesn't carry any information about what type it poin... (by Peter87)
Help with a C++ rainfall program
 
Anyone know what this error means or how to fix? 72 C:\Users\al\Documents\rainfall.cpp 'struct std::string' has no member named 'lowTemp' //Header fi...
[1 reply] : I think you used month .lowTemp instead of months .lowTemp You mis... (by tipaye)
Help loading class objects from file input
 
Hello. I'm fairly new to C++ programming still, and I'm struggling loading a class (and it's two derived classes) from an input file. I'm trying to create an ...
[8 replies] Last: you pass it by reference. example function process_vector(vector<Pri... (by rafae11)
by doc17
Storing outputs
 
Im doing a program for a parking garage. Im trying to save the cost of each car that leaves the garage then totak it at the end. #include <cstdlib> #inc...
[6 replies] Last: thank you for the suggestion is does make the code more simple or user... (by doc17)
C buffer overflow not working
 
I was messing around with the buffers to gain some experience with buffer overflows but this seems not to work with me when I execute these commands from the co...
[2 replies] Last: It worked fine when I overflowed buffer_one, and the value in buffer_t... (by billyb29)
How can I add loop to read 5 numbers from text file?
 
Dear Friends, I wrote a code to get a number from 5 files and do calculations and write the output in other file. It works well. But Now I want to develop it ...
[6 replies] Last: someone gave you an answer on the other thread. (by fabtasticwill)
Array stack, sorting HELP
 
What wrong with my codes? HELP please. #include "stdafx.h" #include <iostream> #include "iomanip" #define STACK_SIZE 5 using namespace std; int st...
[7 replies] Last: is this correct? line 13 - void sort(); line 52 - sort(stackNum, N);... (by knownone)
trying to find largest and second smallest number in several inputs
 
how to find the largest and second ( or third etc.) smallest integer input?? i want this loop to end when 0 or negative integer is input, how would you do? ...
[1 reply] : hello anyone here? i need help please! (by wanchiz)
Benefits of enum (1,2)
 
Hi, I've got a question about using enum in classes. Let's take a look at a sample car class: class car { public: enum color {BLUE, RED,...
[20 replies] Last: Named values. Names for values. class car { static const int foo... (by keskiverto)
Guessing Game
 
Hey, I'm a beginning at coding and I have to make a code that lets you chose if you want to play two games: One where the computer guesses and the second being ...
[no replies]
The highest Mersenne Prime? (hw part 2)
 
Ok, so now I am on part 2 of my homework and I believe I need to use an array in order to solve the second part. But, we have yet to cover arrays in class and I...
[2 replies] Last: Wow got it in 5secs...... thanks for the tip! (by specter113)
How to start a digit recognition program using MNIST in c++ ??
 
I have been reading a lot about Machine learning, deep learning and all the possible algorithms out there. My only problem is I have no idea how to implement th...
[2 replies] Last: Thanks a lot for the answer! looks exactly like what I've been looking... (by Engin007)
getting child class pointer via dynamic_cast
 
Hi, I've got a question about dynamic_cast<child*> (parent) . I have a parent class "window" with different members like "width, height, xpos, ypos etc."...
[5 replies] Last: hi So compiler starts with base class and then, searches downwards b... (by TheIdeasMan)
by Cadis
Basic sales + inventory code
 
Hello. I'm having trouble with this basic sales and inventory code I made. When I enter a quantity of balloons and try to input the quantity afterwards, the els...
[1 reply] : Here's a start. Use while instead of the call to main(). You should be... (by closed account 48T7M4Gy)
Help with a program
 
Solved
[1 reply] : Start by writing a program that reads one set of input, calculates, an... (by keskiverto)
Counting specific character in multiple strings
 
I am trying to write a program that counts the amount of occurrences the letter 'b' appears in every string i type and hit enter. And will display it after i en...
[5 replies] Last: >_> This is exactly the same as a for loop: int i = 0; while(i<max) ... (by poteto)
How can this code get 5 numbers and calculate 5 times
 
Dear Friends, I wrote a code to get a number from 5 files and do calculations and write the output in other file. It works well. But Now I want to develop it ...
[3 replies] Last: Yes to for-loop, no to arrays. Your loop, btw, iterates 6 times. Thi... (by keskiverto)
What's wrong with my code?
 
Hi, i'm programming a system that works as a veterinarian office, it needs to keep track of the people who leaves their mascots there and it needs to be able to...
[1 reply] : All for (int i=0;i<5;++i) loops are missing curly braces. None of y... (by coder777)
October 2014 Pages: 1... 3940414243... 70
  Archived months: [sep2014] [nov2014]

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