Beginners - January 2017 (Page 14)

by atrom
Matrix Output in Console
 
Hey, I am struggling with the output of a "matrix". Well it is not a matrix, but it has to look like one. I don't know where to put the endl; The integer num...
[3 replies] Last: Ahh you were right. I altered the space of the console and it worked! ... (by atrom)
Problem with the very basics - factorial
 
Hello dear fellows, i wrote a little program to calculate the factorial of a natural number but i can't get it to return useful values. The error detection (n ...
[2 replies] Last: You have been right with the missing return value and the decrementati... (by meltorizor)
Segmentation Fault - Passing 2D Array to Function
 
I am trying to write a program that allows a user to choose the size of a matrix and uses a function to allow the user to input values into an array based on th...
[2 replies] Last: Thank you so much Chervil! That fixed it! :) (by gr8flmommy)
Trying to understand a code.
 
I imagine this is a stupid question, I'm sorry, but I was trying to do this exercise, "(...) make a vector of doubles containing the N-1 differences between a...
[4 replies] Last: thank you very much! (by motokosan100)
by mmgh
segmentation fault on std::sort with lambda expression
 
Hello, I am geting segmentattion fault at run time when I compile my code with gcc and g++ on a linux system. But, I don't have this problem when I compile i...
[2 replies] Last: std::vector<star> star; std::vector<planet> planet Hard to ke... (by gunnerfunner)
QT IDE
 
hey guys I wouldn't say I'm new to C++ or programming but my knowledge is not to extensible I would still consider myself a novice anyway I was watching a video...
[4 replies] Last: A framework is like a library. But in a library you have the freedom... (by yanevski)
Deduce Output explanation Help.
 
Q1. #include <iostream> #include <iomanip> #include <cmath> using namespace std; void some_fun(); int main() { int y=2; static int z=3; some_fun(); y+=10;...
[4 replies] Last: @gunnerfunner @Troat Thanks for the reply! it gives me much more under... (by DesmondLee)
Guessing game with binary numbers
 
I'm recently new to c++ and was wondering if I could get some help. I am trying to make a computer guess a binary number which is entered but I have no clue how...
[2 replies] Last: #include <iostream> #include <bitset> #include <string> #include <bit... (by JLBorges)
Please help here.
 
Basically what the program required is to find the percentage of each column of the dataGDP with respect to each column's total GDP. Is there any way I can shor...
[3 replies] Last: thank you guys for the help (by Andy1222)
How can I get my one form to open another I made?
 
How can I get my one form to open another I made? I tried a bunch of things like including one in the other's source code and came up with nothing. I haven't ev...
[2 replies] Last: Thanks! It helped a lot. At first I thought that something was wrong w... (by chiaritoj)
by bbs
Crash if it is false
 
It crashes if the n1 isn`t equal with n/s, idk why #include <iostream> using namespace std; int main() {int n,n1,n2,a,s; cin>>n; cin>>n1; a=n; do...
[1 reply] : On line 14 check that s != 0 if(n / s == n1) What is this program s... (by Thomas1965)
Calculating Square Root Using Expression
 
http://prntscr.com/dwer81 Could someone guide me on how to write this program? I'm not even remotely sure on what to do. Note: I'm limited in what I can use. I ...
[3 replies] Last: how would I be able to make it so it'll take current value and the pr... (by Chervil)
by Crim
Program closes after first step
 
// Final Project.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <string> using namespace std; ...
[5 replies] Last: Thank you all for the help! Really appreciate it (by Crim)
by play4u
Operation with one word at a time?
 
Hey guys, I recently started learning C++. I'm having troubles with a certain problem which converts the words in a sentecnce in a certain way according to the ...
[3 replies] Last: Hey guys, thanks for the quick responses. coder 777 can you elaborate ... (by play4u)
variable being used without Initializing
 
For the following function why is it that the error keep stating that my year and sector have been used without initialized. For the int a it represents the yea...
[5 replies] Last: that's a lot of If statements it would be easier and more readable to ... (by adam2016)
How to Copy an integer array to array of characters(STRING) ?
 
Hi Everyone... i want to copy the student 's part student to The Entered String named as name ... i am getting no idea how to copy this... i tried string's...
[no replies]
Nested Switch Statement
 
This is the program I'm writing "Enter the first letter of a day: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday and print the full name of the ...
[2 replies] Last: #include<iostream> using namespace std; int main(){ int answer = 0;... (by bird1234)
Uppercase or Lowercase
 
Hello. I'm trying to write a program (switch statement) that's able to print whether a user-inputted letter is uppercase or lowercase, but I'm not sure how to d...
[12 replies] Last: @bird1234 My apologies, I just noticed I directed my comment to you ... (by closed account 48T7M4Gy)
Reading file errors
 
I have been looking around and have found a couple of examples on how to do this, but none of them have worked. #include <iostream> #include <SFML/Graphics.h...
[5 replies] Last: it isn't working, it just prints 2 0s It's a good idea to check that... (by Chervil)
TicTacToe not ending the game?
 
Guys, I have no idea why my Tic-Tac-Toe game isn't ending when a winner is clearly established, or when it's a draw. I looked at my code several times and nothi...
[1 reply] : The reason why checkWinner() never returns true is that you compare wi... (by coder777)
January 2017 Pages: 1... 1213141516... 24
  Archived months: [dec2016] [feb2017]

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