Beginners - November 2017 (Page 14)

by yukine
Implicit conversion loses integer precision: 'long' to 'int'
 
hi! I was trying to make a prime number test and this warning came out. I surfed the web and found no possible fixes for this. Implicit conversion loses inte...
[3 replies] Last: I will help you to see it: long n; long a; ..CHOP ... (by jonnin)
Open file and read from a file in Functions
 
Hi, I'm working on a menu where option 1 is ask user for a file name, and option 2 is read from a file. How can I make it to functions? I This is wh...
[6 replies] Last: Yep Chervil's is definitely the way to go. Using references for fstrea... (by Ganado)
converting a coloured image to a black/white
 
Hi guys, I want to write a program that it takes a colour image and converts it to a black/white image! my problem is that i dont know what function must i us...
[2 replies] Last: *greyscale* single byte image conversion is simple, simply average the... (by jonnin)
finding in string
 
I want to find the position of str in str2 if it exists and say a number that shows where it starts. but my code won't give me a right answer if the sentence be...
[1 reply] : I don't know what your code is trying to print, but find() return the ... (by kbw)
find and space
 
I want the user to enter a word and a sentence then I want my program to find the word in that text and cout's the position the word starts. I don't want my pro...
[3 replies] Last: #include <iostream> #include <string> #include <cctyp... (by lastchance)
Go back to a certain part of the code.
 
I'm trying to create a program where you have the option to calculate 5 different things, and I'm struggling with the option to go back to the "menu". It starts...
[5 replies] Last: @Repeater Thanks a lot ! That was exactly what I was looking for ! (by D3V1LL0)
by skt232
how to stop loop and only loop specific info
 
Write your question here. switch (option2) { case 1: { for (int i=0; i<=0; i++) ...
[1 reply] : PLEASE USE CODE TAGS SURROUNDING YOUR CODE: [co de] [/co de] Yo... (by Ganado)
help me
 
fuction x(); in main can not declare...plsz help me ? #include<iostream> using namespace std; int z() { int a=1; } int x(int a) { cout<<a; } i...
[6 replies] Last: Hello phongvants123, Now that you understand better this should make ... (by Handy Andy)
Ncurses backspace problem
 
Hello, i'm having problem with Ncurses and backspace. In an input loop, while space cancel a char, backspace doesn't. if (ch == '\b' || ch == KEY_BACKSPACE...
[3 replies] Last: What is the type of ch? It should be int. (by Peter87)
What is the bug here?
 
Write a C++ function that get two numbers from the user and displays the result of first number raise to the power of second number using do while loop. #...
[3 replies] Last: Ty (by ammar629)
Creating condition.
 
Hello. i have this assignment. 1]create a matrix with a given dimension NxN 2]create a function that will fill the matrix with random boolean values 3]...
[4 replies] Last: TY. (by Jakubaz)
functions calling
 
i was wondering for hours, why it always skip the input when i call the function vowels? any help would be much appreciated . #include<iostream> #inclu...
[5 replies] Last: thank you all again and god bless. (by newguy17)
How does the scope operator actually work?
 
Hello! When I started to learn the SFML library I encountered a lot of usage of the scope operator particularly with sf.That's when I thought that's a namespac...
[6 replies] Last: If you're saying that this is a habbit of mine.I don't think so.Though... (by stonedviper)
c++ code output problem
 
***I have a problem with my output. When I input these values: 10 11 y 0 999999.9 This my output when I input those values, but it is wrong because the number...
[1 reply] : Here’s the current output of your program: Spools to be ordered10 ... (by Enoizat)
calling seperate programs to one program using function calling
 
i have some separate codes and all which i need to do is to combine them and make a single program. each one has int main ( ) parts so i am confused how to do i...
[1 reply] : all which i need to do is to combine them That's a very broad, gener... (by Chervil)
c++ code help
 
I have a problem with my output when I input these numbers : 0 200 -1 12 y -0.01 5.99 This is my output which is incorrect because it has those spacing's: S...
[1 reply] : Hello , Best to stick to one post or the other. http://www.cplusplus... (by Handy Andy)
c++ code problem
 
I have a problem with my output. When I input no values and click run, this is what my output says: Program generated too much output. Output restricted to 50...
[1 reply] : Hello bal160730, You need to be more specific about your problem. W... (by Handy Andy)
Sorting array using selection method
 
Hi everyone! So as the title says, I was instructed to write a program that takes an array from the user and sorts the numbers from least to greatest using the ...
[2 replies] Last: Is this assignment due for you tomorrow as well? lol #include <iostr... (by keanuwannabe)
by Sirss
Can someone help me out?!
 
I have assignment but the teacher didnt tell me what should i do, there's code in a paper and he gave it to me. I wrote down the whole things but i couldn't com...
[3 replies] Last: Hello Sirss, First question I have is this a class in C or C++? I ca... (by Handy Andy)
Time Calculation and Format
 
Hello, Im Really lost on a project im playing around with, could you provide me with a good set of code to use? Here is a list of things it has to have....
[4 replies] Last: Thank you for the break down on my mistake with using double. My fix w... (by sr2cute702)
November 2017 Pages: 1... 1213141516... 33
  Archived months: [oct2017] [dec2017]

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