Beginners - December 2020 (Page 2)

Error LNK2019
 
Hello guys once again. I would like to ask yuou a question regarding my following code. Despite the fact that visual studio states that no issues found, when I ...
[4 replies] Last: There is an issue with get_xyz(). This doesn't do what you trying to d... (by seeplus)
C++ change letters to asterisk
 
I want to make this with int replace_char function, but i dont know what to change in this to make it work....I'm stuck... should look like this - https://imgu...
[8 replies] Last: first letter of each word to be a capital letter Assuming this, con... (by seeplus)
"const int&" vs "const int" as parameters
 
Hello I have one question. On the code we receive from the Professor he sometimes uses as parameter: const int& or const T& As far as I know, const will ...
[12 replies] Last: On the code we receive from the Professor he sometimes uses as parame... (by keskiverto)
by ldj244
how to start writing a program
 
Hello! for senior design class, me and my teammates decided to create a project that has a lot of coding in order for us to learn. We basically want to write an...
[6 replies] Last: * if the page in that link is in russian, there is a button on top of ... (by ldj244)
strcpy in C++
 
Hello, I have two strings and used strcpy. After strcpy I expected s1 will be: abcdefgh and s2: abcde but I have: (please see photo) https://ibb.co/zXtKx...
[6 replies] Last: When defining an array, if you don't give the size then the size is de... (by dutch)
Printing vectors from a class with private data without using friend function
 
I have code that adds two imaginary numbers and prints the results when the data are all public. This code is from an online tutorial I am following. #in...
[4 replies] Last: There is no need to have std::ostream operator<< be a friend as long... (by deleted account xyzzy)
One dimensional arrays
 
Hello! How do I make a program in C++,in a one-dimensional array consisting of n integer elements, calculate: -number of paired elements standing in even place...
[1 reply] : Hello intersted2405, I would start with defining the array and inputt... (by Handy Andy)
C++ program
 
Hello! How can I make a program in C ++, some given x and eps determined by input, calculate the sum of those terms that are greater in absolute value than eps....
[5 replies] Last: [quote=Sukuna231]this formula is used here: sin(x)/x=1-x^2/3!+x^4/5!-x... (by lastchance)
by jidris
Given a one-dimensional array, check if the elements in the array are in ascending / descending order
 
Write your question here. # include <iostream> # include <algorithm> using namespace std; int main() { int n {74, 67,54, 42, 25}; int i; for (i = 0; i < 1; ...
[10 replies] Last: #include <iostream> using namespace std; int strictlyOrdered( int *A... (by lastchance)
Calculating average height of N people
 
Hello! How do I make a program in C++ in which the heights of N number of people will be input in centimeters? Also, all of the following should be included: ...
[7 replies] Last: Assuming I've got my limits right as per the question, consider: #i... (by seeplus)
Arrays for input numbers that are +12 greater and -12 smaller than average
 
Hi guys. The following is the code I made. How do I make arrays that will print out the input numbers that are +12 greater and -12 smaller than the average? #i...
[4 replies] Last: Only 1 iteration over the array is needed. Consider: #include <iost... (by seeplus)
How to catch WM_DESTROY (from Alt+F4 or Close)
 
Hi there Fooling around with my first window. Following problem: I have included a security question to ask the user if he really wants to close the window. I...
[2 replies] Last: That did it! Thank you! :-) Here the changed code section: case ... (by theoneandonlyboiler)
by jidris
array i have been trying to swap the minimum with the maximum number but i couldn't get it
 
Write your question here. # include <iostream> # include <algorithm> using namespace std; int main() { int n = { 11, 23, 14, 16, 17 }; int min, ...
[4 replies] Last: You could also say auto [min, max] = std::minmax_element(std::begin(a... (by mbozzi)
Get array of integer in one line - C++
 
Hello, How can I get an array of integers in one line? In the below code I should enter each integer in a new line. #include<iostream> #include<cmat...
[4 replies] Last: #include <Windows.h> //<~not sure if this is needed or not. #include... (by markyrocks)
Decision Making in C++ (if , if..else, Nested if, if-else-if )
 
Hello, I want to write a program that receives two numbers X and Y from the input. "without decision making" (decisions statements) determine how many of the f...
[4 replies] Last: Hello Shervan360, Well lets take a look at what you have: #include<... (by Handy Andy)
by dune
Copy Ctor
 
I'm working through a Udemy course on C++ and just came across this. In my lesson on copy constructors, I kind of jumped the gun on what he was teaching, paused...
[9 replies] Last: Seek and ye shall find: https://web.archive.org/web/20160602100235/... (by dune)
I'd just like to say Merry Christmas...and...setupapi.h
 
Merry Christmas and man are microsoft some real jerks.... I'm playing around in the setupapi.h .... they sure don't make life easy that's for sure. You can ...
[3 replies] Last: I did actually figure that out. Its just so ridiculous how this is al... (by markyrocks)
Read and write file C++
 
I just learned on how to read and write file, and I did some practices on it. However, I'm quite confused about it. Like this example is very simple, however, I...
[2 replies] Last: Oh I see, thank you very much for helping me. (by Violetzz)
printing char array recursive
 
User enters char array from and I need to print only the ones he used (there are 9 slots he can used) couldn't figure why this doesn't work. all the slots are...
[3 replies] Last: Hello jordandan, PLEASE ALWAYS USE CODE TAGS (the <> formatting but... (by Handy Andy)
undefined reference
 
Hey all, working on a problem from exercism.io and am getting the error "undefined reference to `nucleotide_count::counter::nucleotide_counts()" Thanks in adv...
[1 reply] : Is Nucleotide_count.cpp in your project file? Your project needs to l... (by salem c)
December 2020 Pages: 1234... 11
  Archived months: [nov2020] [jan2021]

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