Beginners - March 2016 (Page 45)

by rantiv
vectors
The program will prompt the user for a value and will try to find it in the populated vector in the main function. The program will call the 'findName' function...
Mar 2, 2016 at 5:57am
[1 reply] : Where is your findName function defined? (by integralfx)
Struct and Arrays, menu driven
I'm working with structs and arrays, and I was wondering how I could get the function "makeselection" to work, I'm stumped on it, I know it's wrong but I'm look...
Mar 2, 2016 at 5:13am
[1 reply] : In line no. 7, you hav given menulist an int type of variable. int ... (by MaBunny)
by rantiv
Whats wrong?
Keep asking the user for characters until the user enters #. The characters may be stored in a vector of chars or in a string. Do NOT include # in your list. If...
Mar 2, 2016 at 4:39am
[1 reply] : #include <iostream> #include <string> #include <algorithm> int main(... (by JLBorges)
Help! my program skipped the cin.
The compiler asked for first answer of student but skipped the others in the first for loop. #include <iostream> using namespace std; int main () { int ...
Mar 2, 2016 at 3:59am
[2 replies] Last: Thank you, sMav! It work! <3 (by aesopq122333)
Why other compliers not showing precise output?
Why when I use our DEV C++ on home, it shows the real output like the total deduction, total netpay, etc. But when I use the DEV C++ complier on school, it show...
Mar 2, 2016 at 3:18am
[no replies]
SOS not getting proper output
I have an assignment that takes an input of weather data and processes to give an output in the form of a table It takes the input: STATION,STATION_NAME,ELEV...
Mar 2, 2016 at 3:01am
[no replies]
Why is getchar ( ) not working?
Since i want to type in with Enter, i initially wrote down my code with getchar ( ), however it didn't work and i was forced to replace it with getche ( ). Is t...
Mar 2, 2016 at 2:54am
[no replies]
Pointers
Is someone willing to explain how pointers work to me and why would I prefer to use them? Here is an example code our professor gave to us. #include <...
Mar 2, 2016 at 2:45am
[1 reply] : http://www.learncpp.com/cpp-tutorial/67-introduction-to-pointers/ (by closed account E0p9LyTq)
Need Help with Inheritance(BankAccount/CheckingAccount) School Assignment Code Problem
Hi, I was having problems with the following school assignment: "Define the class bankAccount to store a bank customer’s account number and balance. Suppos...
Mar 2, 2016 at 2:24am
[no replies]
How do I code jumping, platforms, and player movement across the screen? (2D)
Write your question here. How do I code jumping, platforms, and player movement across the screen? I was just needing this so I can start coding a level of ...
Mar 2, 2016 at 2:04am
[1 reply] : I will assume you are new, which is fine! I recommend checking out laz... (by Hambone)
Strange error
I am using turbo c++ Program works fine if I use trace into (F7) but the same program when compiled (Ctrl+F9) gives unexpected output Any reasons for this kin...
Mar 2, 2016 at 2:01am
[no replies]
Is this program not supposed to output 5 x 5 4 3 2 1 when i type in 5 (or whatever number it is)
It outputs an infinite number of numbers. How should i do it? #include <stdio.h> int main(void) { int i; printf("Enter a number: "); scanf_s("%d",...
Mar 2, 2016 at 12:55am
[3 replies] Last: That's a great explanation! Thanks a lot! (by Gondvanaz)
by tyooo
User Input Date, Debug Output Day name
I need to make this program work so that I can input the date, month, day, and year. Then I need the debug to output the day be it sunday, monday, etc. This pro...
Mar 2, 2016 at 12:38am
[no replies]
HELPPPPPPP
so this code is supposed to take an input file with data and keep one line of the data is all 12 months are present. If not, then we simply keep the name and ou...
Mar 2, 2016 at 12:11am
[1 reply] : can't seem to make my code work properly. Don't s'pose you'd be int... (by Chervil)
Assistance needed in implementation of a deep copy constructor.
Hello, We were instructed to do in our programming assignment to implement the copy constructor below. However I am struggling on it. Our instructor gave us th...
Mar 2, 2016 at 12:09am
[4 replies] Last: Recursion occurs when a function calls itself directly or indirectly. ... (by WhatHaveIChoosen22)
by Lospwr
My Code isn't compiling, can anyone help me figure out where i went wrong
#include <iostream> #include <cstdlib> #include <fstream> using namespace std; int main( ) { ifstream inFile1; ifstream inFile2; ofstream outFile1; ...
Mar 1, 2016 at 11:58pm
[1 reply] : you cannot do inFile2 >> fClientName; you can use the >> operat... (by rafae11)
Task
Help for task. Two players are playing the game "Risk". This game is played on the pattern of cities that are interconnected by roads. If two cities are direc...
Mar 1, 2016 at 11:46pm
[1 reply] : Please I need help this is hard task can someone help me please ? :) :... (by Krenkov)
What is the difference between declaring function as void myfunc(int *a) and void myfunc(int a[])
Apparently arrays are passed to functions by address and not by value. When then is the difference between declaring the function parameter as void myfunc(i...
Mar 1, 2016 at 11:44pm
[7 replies] Last: The standard library passes arrays by reference, in std::begin, std::c... (by Cubbi)
Trying to get into game programming. No idea what I'm supposed to learn
Let me explain myself a little better. I've been learning c++ piece by piece for a few months. I've read a couple of books and I'm learning a lot, but I have no...
Mar 1, 2016 at 11:25pm
[1 reply] : "What am I supposed to do to create my own game?" Two things. Firstly... (by Moschops)
file into vector (last line being copied twice)
Hey guys, Im trying to copy lines of a txt file into a vector. Everything is working fine except the last line is being copied twice. I cant figure out why ...
Mar 1, 2016 at 11:19pm
[2 replies] Last: If your file has some blank lines after the last valid entry you'll se... (by jlb)
March 2016 Pages: 1... 4344454647
  Archived months: [feb2016] [apr2016]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.