Beginners - December 2015 (Page 40)

by nj1995
Issue with program
 
When I run my code its runs but displays "More rational numbers (Y/N)?" over and over and I am unsure what is causing this issue. #include <iostream> #in...
[1 reply] : You need to check function return codes for errors. Probably cin is n... (by koothkeeper)
Function and Array Issue
 
Hello, I've been working on this program for my class that focuses on the use of functions and arrays. We need to make it so the user can enter 3 lengths for a ...
[5 replies] Last: There are other problems also. Line 17: triangleLengths is defined... (by AbstractionAnon)
While Loop
 
I need help to write and application that displays a menu, with 2 choices, 1, 2 . if a person chooses 1. I need to print out a silly joke and then ask them to c...
[2 replies] Last: could there be a way to write this without using if statements? Yes.... (by AbstractionAnon)
Alarm clock program
 
So this is what i've made so far. i call it Alarm Clock v 0.1. Of course it just the beginning. Problems I've encountered so far: 1)it does not change the time ...
[no replies]
Removing Elements from a 2D Vector
 
Hello, I am writing a program for a Sudoku puzzle using Constraint Satisfaction. I have created a 2D vector to store the domains of possible values: vector<ve...
[3 replies] Last: Yes but why are you using this constant in a for() loop that removes e... (by jlb)
Delete Every Third Element in the array
 
I have tried my level best to solve this problem . I have tried this much . how i can complete this question ? Thank You #include<stdio.h> #include<co...
[2 replies] Last: Break the problem into two parts. 1) Create a loop that identifies ev... (by AbstractionAnon)
Factorials and Recursion
 
Is this program correct? Also, what comments should I put in the program? Write a program that requests a factorial position from the user and calculates it...
[8 replies] Last: I have put a loop in it and I don't know where it should go. You hav... (by AbstractionAnon)
Char dynamic array
 
Hello, I'm trying to adjust this program to make it run for customer size (s). i cant seem to figure out how to make the program accept the (s) value. cla...
[3 replies] Last: You can do this within a function only. Keep in mind that it is essent... (by coder777)
Swapping Elements in strings.
 
So, I wanted to write a function which swaps elements of strings, given their place in the string, so I wrote the following code, void swap_element(string ...
[2 replies] Last: Thanks. I knew I had forgotten something, but couldn't remember what :... (by jgg2002)
Dividing array in two new arrays
 
Hello world! So situation is as follows. I'm total beginner in C++ and it is first language I am learning. I have this task given: From array A(2n) I nee...
[5 replies] Last: You could 'delete' them by moving all other elements at higher indexes... (by cire)
Initialize array inside constructor
 
[quote=superFlaffo]Hi all, I need to initialize an array inside a constructor. Can something like this be possible? class ciao { public: // Constructor & De...
[5 replies] Last: A big disadvantage of not saving the "size" in the class is that the c... (by jlb)
Becoming intermediate through real projects?
 
Dear fellow programmers, I'm Memento and new to Cplusplus.com, I already feel at home. I have a question regarding the progression from beginner to intermedia...
[no replies]
Core dumped in print
 
Hello People, I have a problem with my code, I am trying to make a gamefield existing of 8x8 tiles. But now I have a segmentation fault (core dumped. The fau...
[4 replies] Last: Hey I fix this but i get still segmentation fault(core dumped). How c... (by Othello)
Need explanation: Equation solving code
 
Hello A few months ago I found a code which was able to solve equations. At first I didn't understood it at all, I tried examining the code and with some su...
[4 replies] Last: Sometimes it can help to just step through the code and work out what'... (by TwilightSpectre)
vocabulary trainer
 
Hello everybody, who can program a small and fast vocabulary trainer?
[1 reply] : I imagine quite a few of us can. Why do you want to know? If you're ... (by MikeyBoy)
comparison between the signed and unsigned integer
 
Hello forum I am having the warning from the GCC compiler related to the issue. I have defined the size of a domain as follows: glm::uint64 T; Si...
[6 replies] Last: You may do this: const glm::int64 t_2 = T / 2; (by coder777)
Arrays
 
Please explain to me on how to get the out for this code: int list , i, j; for ( i = 9; i >= 0; --i ) { list = i * 100 – 5; if ( i % 3 == 1 ) lis...
[10 replies] Last: If you fix the error in line 7 the output will look like this. -5 390... (by Thomas1965)
Final project help (1,2)
 
Hello, I am working on this project for my first computer science class and was in need of some help. I keep getting this error. error C2664: 'void enterKey(cha...
[24 replies] Last: #include <iostream> #include <iomanip> #include <string> #include <fs... (by closed account 48T7M4Gy)
Trouble with finding lowest value in Array!
 
Hello, I have a project due very soon. It involves reading data from a file, putting the data into an array, finding the lowest and highest value in an array. I...
[17 replies] Last: Thanks for your help! (by RatStick909)
Getting Error when using remove() with strings
 
I'm trying to make it so that the user of a program can delete a file depending on the number the enter. If the user enters 1, the code would check if "file1.tx...
[3 replies] Last: Thanks for responding. I replaced that bit of code with the one coder7... (by derekle560)
December 2015 Pages: 1... 383940414243
  Archived months: [nov2015] [jan2016]

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