Beginners - November 2016 (Page 23)

How to calculate distance in Nautical miles using structures
 
Hello. I am trying to make a program where I need to calculate the distance between two airports using a structure. The program needs to ask the user to enter a...
[4 replies] Last: Something like this? You still need to code the arithmetic. struct ... (by Bdanielz)
by nu123
errors in
 
hi ther, just wondering I keep getting a heap of errors on my code, can anyone point me towards were I went wrong and how to fix it? thanks in advanced #...
[4 replies] Last: thanks for the help ill give the code another go and see can I get it ... (by nu123)
Trying to output special characters to the console.
 
I'm trying to take an array of characters and, based on the number in the curren't array spot, output a certain character to the console, a tilemap for a little...
[no replies]
cannot convert char** to char*
 
On line 43 I am getting the error "cannot convert char** to char*. I don't quite understand why. Is it an issue with the use of 'atoi'? #include <iostream...
[2 replies] Last: Thanks. I guess I thought the issue might have been converting argv to... (by Jack816)
by MRJ897
Help with function
 
.
[1 reply] : #include <iostream> using namespace std; const int YEARS = 3; void ... (by joe864864)
Problem calculating series
 
Hello everyone :) I'm trying to write a program that calculates sum of a series (x*ln(a))^n/n! (the sum of the series gives a^x.) where n = 0, 1, 2, 3, ... u...
[3 replies] Last: Persimonal - you may need a better way to set up and sum your power se... (by lastchance)
how to use with big num?
 
hello how can I use very big numbers in c++? for example 100^100 I am a Beginner so if it is possible explain it thank you
[1 reply] : External library support is required. Check out GNU MPFR and GMP. ht... (by mbozzi)
Help counting both words and characters in a loop
 
Hello, I am trying to create a loop that will read a file containing an array of strings into an array, where I can then edit individual words. I've created a "...
[2 replies] Last: Thanks Andy! I got it working with a slight adjustment to the code you... (by ahoward527)
Problem with Insertion and Deletion in custom Linked List Class
 
I am defining a linked list that has nodes that contain text strings. My problem is twofold. In Part 1, I am trying to insert a node past the farthest node I al...
[1 reply] : snippet 1 --------- line 11: What if cur is NULL? Line 20: You neve... (by AbstractionAnon)
2D Array using int variable to find
 
I am trying to use two for loops to find the location of a character in a 4x4 array, and store the location in int row col variables, and read out the character...
[3 replies] Last: int col; int row; // do the search // if not found, do something st... (by keskiverto)
by Bavro3
Jumping between functions
 
Hello! What i'd like to do here is for the program to jump back and forth from the House and Outside functions after pressing any key on the keyboard, and i hav...
[5 replies] Last: Minimal version #include <iostream> void outside(); void home(); i... (by Chervil)
by soy01
Encryption based on a key
 
I'm trying to encrypt the text inside a file based on a 5 uppercase letter key entered by the user. Here's what I have so far: void encrypt(ifstream& i...
[1 reply] : Lines 29-31: You reset your loop variable to 0. How do you ever expe... (by AbstractionAnon)
Beginner Project
 
Good evening: I am working in a beginner program to help me learn C++. The current code I am trying to generate is to determine validity of C++. It is suppos...
[5 replies] Last: Thank you everyone. I signed up for the class I am taking, thinki... (by SamT1234)
Switch statement not using "default"
 
Hi, I need some help with this program. This problem is from "Programming: Principles and Practice using C++" by Bjarne Stroustrup. The problem is, when there a...
[5 replies] Last: Thanks for the help. I realized that instead of printing the result fr... (by yuriy14)
by nu123
code not returning to start
 
hello there. if a quick question about my code, i seem to have a problem at the end and i cant solve it. i was hopeing that after the program was finished its c...
[5 replies] Last: You only need one of these two lines:[code firstline=51] while(ch... (by Chervil)
istream_iterator insert one multiple choice questions
 
I'm creating a Trivia game and I have Question object to hold multiple choice questions and store it into a VecQuestions. My problem is when the text file have ...
[no replies]
Compass point
 
Hi guys..this is for my assignment. the code that i have attempt to do is, i believe it is wrong since it doesn't display the output that i want instead it disp...
[2 replies] Last: #include <iostream> #include <cmath> #include <string> using namespac... (by lastchance)
by Bavro3
Problem whilst making a game
 
So i ran into a bit of a problem while making my text-based game. There are two places in this game - one is the House and the other is Outside. At the start o...
[2 replies] Last: Okay then, thanks for the help! (by Bavro3)
Adding a user input
 
My question is: I have made this simple code that prints a 7 x 7 grid with the middle row and column printing a "." instead of "*". How would I adjust this c...
[1 reply] : You need a variable for cols - I assume that number of cols and rows a... (by Thomas1965)
const <type> &name (reference to const)
 
When you define a function like: void func(int x); then you're passing arguments by value . When you define a function like: void func(int &x); your passi...
[8 replies] Last: @Peter87 Sorry, misread. Thanks for the help. (by boost lexical cast)
November 2016 Pages: 1... 2122232425... 44
  Archived months: [oct2016] [dec2016]

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