Beginners - April 2016 (Page 40)

What am I missing in my code?
 
I take an integer array, it's length and the number of elements to right shift. #include <iostream> #include <string> #include <vector> using namespace...
[6 replies] Last: I'm given a positive integer array in order for example: {1,2,3,4,5} b... (by JoshuaStudent)
by lamram
creating class
 
Hi guys. I need your help. I am so beginner in C++. For Header file,and source file what I need to add? in which one I need to decelare? Create a class Mo...
[1 reply] : http://www.cplusplus.com/articles/Gw6AC542/ (by keskiverto)
Clearing code
 
Hi everyone! I want to learn to code so I decided to start by making a simple tic tac toe game. I have a plan in my mind but I'm not sure if you can actually...
[4 replies] Last: Thanks everyone, I figured out how to do it now with loops! (by analyst)
by ketnav
Caesar Cipher
 
Hi guys, I have written a "Caesar cipher" code but I've been stuck since 2 days trying to work out why the section of my code that is supposed to increment the ...
[7 replies] Last: @ketnav No, I'm sorry, but cannot figure out the reason it doesn't in... (by whitenite1)
Having some trouble starting with SDL 2.0.
 
Hello everyone , I am still learning c++ as a beginner and i made it through the basics , now i am focusing on 2d arcade games. I am using SDL 2.0 in visual stu...
[2 replies] Last: Thanks for the advice , i have done that , the build was successful bu... (by tarekhojeiri)
arrays of stucture
 
Write a program that define a structure to store id, pages and price of a book.It declares an array of structure to store record of five books. It inputs the r...
[6 replies] Last: You have a "library" for five books (line 7). You do read the data of... (by keskiverto)
Making an 3x3 array with random numbers
 
I wrote the code for 3x3 array to get random numbers as a its elements but, I am getting all row elements same. can anybody tell me what is wrong with this. ...
[2 replies] Last: #include <iostream> #include <cstdlib> using namespace std; int main(... (by Suixle)
i want help
 
Write a program to declare a variable of structure to store the student records and dress of student records and address. Enter the 10 students and find the re...
[2 replies] Last: How can we help? You have not provide the problem. All I see is a home... (by chicofeo)
input file
 
i had a question regarding input files. is there any way to set up a message to pop up if the input file doesn't exist? this is the code i have. they want me to...
[3 replies] Last: Under Windows you can use this function. bool FileExists (const char... (by Thomas1965)
Counter Help -- Difficulties Understanding Instructions
 
I'm working on a project and I'm having trouble understanding my professor's instructions. In particular, this part: "Display your results as SETs of output...
[10 replies] Last: We haven't covered that in class and we're supposed to use information... (by CopaceticCoffee)
How is the sum of all odd or even numbers found
 
How do you find the sum of all the numbers output from a loop? #include <iostream> using namespace std; int main() { int a, b, c; cout << "...
[3 replies] Last: num % 2 = 0 else num % 2 != 0 to find odd or even and then total them... (by miah612000)
How to hard code a graph?
 
I am trying to implement Dijsktra algorithm and I must use this graph to find the shortest path from node 20 to 21. https://i.gyazo.com/6f98ea61568771f0e80d4...
[3 replies] Last: Use a container? (by cire)
Getting weird output
 
I am writing a program using Eclipse for a class project. I am getting a strange output for my declared variable "fillGallons" at the end of the code. This part...
[2 replies] Last: Thank you so much! This fixed my problem. (by CopaceticCoffee)
I need help with two things I cant get to work?? (Arrays)
 
I am in the middle of doing a project and is a bit confused about two things. 1. How do you print out the last 4 items in an array, I know how to print out ...
[1 reply] : 1) http://www.cplusplus.com/doc/tutorial/arrays/ 2) If you're referrin... (by shamieh)
looping through a text file
 
im coding a maze using recursion and im having trouble getting the starting points from the bottom of the text file it works only because I have hard coded numb...
[no replies]
Doubly Linked List (Add F'n & Copy Construct)
 
I can't figure out what is wrong with my "Addtolist" function and Copy constructor for a doubly linked list. I both a head and tail pointer. template<cla...
[2 replies] Last: I originally had tail pointers but deleted them once I posted here, th... (by kim3721)
What does my professor's project mean and how do I solve?
 
I don't understand any of the problem and have no idea how to begin. Could someone give me a suggestion and tell me what I am supposed to do here? To overcome...
[1 reply] : The problem he is addressing is that the basic type int has a limit ... (by Moschops)
Program that computes amount of months to repay a loan
 
My program is correctly outputting the correct amount of months to repay a given loan amount. Could someone help me with the math part of the solution? I'm tryi...
[3 replies] Last: The problem may be that the equations are not right (by kromari)
Loading array from file using StringStream
 
First time on this form and new c++ programmer. So I am given a file with an array of numbers, and im trying to use get line and stringstream to get the first l...
[1 reply] : Hi, For example > string data; ifstream opener; opener.open("path\\... (by princess code)
Function Help
 
I am writing a lottery program and I am almost done but have one problem. The user input cannot have the same number twice and the assignment came with a functi...
[2 replies] Last: Here is a simple code that has a user enter numbers 10 times, but asks... (by PBachmann)
April 2016 Pages: 1... 383940414243
  Archived months: [mar2016] [may2016]

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