Beginners - December 2016 (Page 16)

Bordered Plus Pattern Coding Problem
 
So I've been working on this code to make a bordered plus pattern with just using nested loops and conditional statements, and I cannot figure out how to get th...
[1 reply] : That code seems pretty good for making a diagonal cross. To make a p... (by Chervil)
Error On Array Output
 
Getting Weird Output #include<iostream> using namespace std; double gpa(char *, char*); int main() { char arr , arr1 ; double gpa1 = 0.00; cout << "\nEn...
[8 replies] Last: Yes, that seems to work. You could simplify it slightly by changing t... (by Chervil)
What would be a method to call a user input from one function to the main function?
 
I'm trying to do a project for school, and I'm a little stuck. I have to simulate gas consumption of a car on a road trip under different scenarios (e.g.: weath...
[5 replies] Last: Hydranix, that's great, thank you! I've been racking my brain while tr... (by ElmStreet)
how to fix these errors?
 
So, I have this homework where we are working with overloading. It has a double pointer with 2d matrix. I did the overloading part the right way, the following ...
[3 replies] Last: You do mean something like the 'maxsize' in //inverse function void I... (by keskiverto)
Char array error
 
I am not getting the Second input #include<iostream> using namespace std; void hello(char *, char *); int main() { char arr , arr1 ; cin.get(a...
[1 reply] : i get it i just have to use cin.ignore(); between line no 8 and 9... (by bird1234)
Displaying Text in a Text Adventure game
 
I'm making a very wordy text adventure game but the text keeps getting cut off. I tried using endl but even that gets cut off frequently. Is there anything I ca...
[4 replies] Last: when a scentence reaches the end of a line, it will go to the next li... (by Chervil)
by morgl
.exe has stopped runnung
 
Greetings! :) Can you please tell me why does windows says ".exe has stopped running" after i give values for the two int that goes to cin? (I am using codebl...
[2 replies] Last: Thank you integralfx! :) (by morgl)
Final Project: Stuck on adding planets and its data
 
This is my final project assignment: Write a C++ program that will help astronomers keep track of planets. Your program should use a class that has members to...
[5 replies] Last: You can use an iterator instead of the range loop: for (set<Planet>... (by gunnerfunner)
array multiple data types???
 
I want to make an array who have for example: c = 0; c = "fgdfg"; c = 2.0 is this possible???
[no replies]
by dawe73
C++ book
 
Hello. I'm deciding between two books: C++ Primer and Programming: Principles and practice using C++. Which one you would recommend and why (some advantages a...
[2 replies] Last: Senhor, I've already read so short book and now I'm serching for somet... (by dawe73)
Class Employee
 
How to print message when year work is negative? Please help! #include "employee.h" #include <iostream> #include <iomanip> #include <string> void display(); ...
[no replies]
Need your inputs please
 
Hello! I am struggling to figure out why this solution is giving me LNK1120 and LNK2019 error message when I am trying to build the solution but there's no e...
[6 replies] Last: OP: all your functions return void, so don't expect any output from th... (by gunnerfunner)
Discussion on Dynamic Arrays
 
"A Dynamic Array is an Array whose size is not specified when you write the program, but is determined while the program is running" - Savitch Short Question:...
[10 replies] Last: Freddie: this is amazing! Many thanks for a real-world example and the... (by gunnerfunner)
how to put decimal point
 
So, I'm trying to figure out how to put a decimal point in my balance. My program has increments for cents, dimes, dollars, and tens of dollars. For example, If...
[4 replies] Last: I got it to worked. Thanks! (by Poropin)
Prime numbers
 
Hello, I want to make a program which checks how many numbers are 'till it meets number 0. I've tried this - but it doesn't work. Can anyone fix it? #i...
[10 replies] Last: thnx @ar2007 for identifying my mistake (by bird1234)
Enums Error
 
Hi! I am new to C++ and i just started learning about Enumerations.So i made a very simple programme which uses enums, but every time i try to run it, its just ...
[6 replies] Last: Thanks! :) (by Xrey274)
by A34
Using a function to increment every number in an array by 1
 
I want the program to read in a set of numbers from a file, increment each number by 1, then output to a different file. Can somebody please tell me what I am d...
[2 replies] Last: Two errors (I think): (1) Lines 55 and 74 should both be for (i=... (by lastchance)
can't pass array to to function
 
Why don't this match together? void fnc( int ** arr) { } int main() { int arr ; fnc( arr ); } Here the compiler error: error: ...
[6 replies] Last: That could be. When I compile my example with a C-compiler, I get a wa... (by nuderobmonkey)
passing to 2D Array into function to initialize the content
 
I am new into C++ and need help please.i am in need in generating and initializing 2D array using function. basically my code is to pass on array and some inte...
[4 replies] Last: You can't do that in the line with your question marks. Because you ca... (by nuderobmonkey)
Saving result to variable
 
Hello, So I'm just a newbie and I've been trying to write my own calculator (I've done it before but now I wanted it to be more complex and useful). My qu...
[7 replies] Last: How about an array? #define RESULTS_SIZE 5 int Results[ RESULTS_S... (by koothkeeper)
December 2016 Pages: 1... 1415161718... 28
  Archived months: [nov2016] [jan2017]

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