[try Beta version]
Not logged in

Beginners - April 2019 (Page 2)

std::swap()
 
Hello, I've read that the std::swap() function is valid for any data type, as long as they can be...
Apr 29, 2019 at 5:01pm
[5 replies] Last: @kyrresc: Read about name lookup: https://en.cppreference.com/w/cpp/la... (by keskiverto)
the char data type error
 
Hello Everyone!! when I type (y or Y) or (n or N) it correspondingly outputs the according to cod...
Apr 29, 2019 at 2:54pm
[2 replies] Last: Thank You, I got that... (by pratyushmisra)
can someone explain how the vlaue is 6?
 
as the tittle suggests, can someone explain to me how the value here is 6 int Operation1(int a...
Apr 29, 2019 at 1:01pm
[3 replies] Last: can someone explain to me how Can you explain to us how you did work... (by keskiverto)
result not correct
 
It give output as 2 though I declared y as float.I want it to give ans 2.5 #include <iostrea...
Apr 29, 2019 at 11:16am
[7 replies] Last: Mike's code makes it hard to see the decimal point (he was doing that... (by MikeStgt)
Recursive Functions: Getting the Sum of Even or Odd Integers in Given Range
 
I'm writing a C++ program that asks the user to enter a single number from 1 to 50 and a choice of "...
Apr 29, 2019 at 8:08am
[3 replies] Last: #include <iostream> #include <string> using namespace std; int main(... (by lastchance)
by Eto
Find n prime numbers
 
#include <iostream> using namespace std; void getPrime(int); int main() { int n; cout ...
Apr 29, 2019 at 7:41am
[3 replies] Last: See https://github.com/kimwalisch/primesieve#primesieve (by MikeStgt)
Sorting by Last Name
 
So I have a text file with students names. I made a struct with first names, last names, and grade. ...
Apr 29, 2019 at 6:48am
[4 replies] Last: > I also changed the loop variables and it outputed the names correctl... (by salem c)
Calculating an Average
 
I have an assignment where I have 20 students with different test scores. The test score is set as a...
Apr 29, 2019 at 4:18am
[4 replies] Last: I saw in the diagnostics my test scores were were incorrect. I fixed i... (by simulationspecimen)
two dimensional array
 
Write a C++ program that uses a two-dimensional array to display a table of probabilities for a pa...
Apr 29, 2019 at 2:22am
[3 replies] Last: int dice1 = rand() % 9 + 4; This gives a range of 4 to 12. It is a... (by deleted account xyzzy)
Help with vectors (modifying, adding, deleting)
 
I've been having a really hard time with this assignment. The description of the assignment is a bi...
Apr 29, 2019 at 1:18am
[2 replies] Last: There are several different ways to create and initialize the contents... (by deleted account xyzzy)
How do you verify if a password contains a digit?
 
Hi, right now I'm working on a final project for my comp sci class. Part of the project involves...
Apr 28, 2019 at 11:51pm
[3 replies] Last: Works perfectly. Thank you guys for all your help. Much appreciated. (by kdrewes)
Code Clean Up Help
 
Good Afternoon, I am trying to clean up my code and what I would like to do is find a way to turn t...
Apr 28, 2019 at 9:02pm
[2 replies] Last: Create a reserveSeat() function that takes the start and end rows to d... (by dhayden)
by Joo
Problem with copying a region from two dimensional array to another two dimensional array
 
I have a problem with my program. I want to copy a certain region of size SS around a pixel of index...
Apr 28, 2019 at 5:28pm
[4 replies] Last: I've made a testing environment for Joo's function. There I got no seg... (by nuderobmonkey)
Scoped enum as input to function
 
This should be easy but.. I have the following scoped enum defined enum class Suit{clubs,diamond...
Apr 28, 2019 at 4:12pm
[1 reply] : std::string to_string( Suit s ) { switch(s) { case Suit... (by JLBorges)
Errors with classes
 
I am using CodeBlocks to learn C++. The problem I'm having is I created a class. Like 2 other files,...
Apr 28, 2019 at 3:57pm
[3 replies] Last: http://wiki.codeblocks.org/index.php/Creating_a_new_project (by Repeater)
User Defined Functions and Arrays
 
Good Morning, I realized on my last question I phrased it wrong, I would like to have a user defined...
Apr 28, 2019 at 3:18pm
[3 replies] Last: yes. its already reference, so change it in the function and it will ... (by jonnin)
Adding two polynomials
 
Hye! I am trying to add two polynomials whose exponents and coefficients are entered by user himself...
Apr 28, 2019 at 12:26pm
[1 reply] : Before delving into your code, please note you’re shadowing your cla... (by Enoizat)
Arrays and changing an int into a symbol
 
Good Morning, I have two questions, the first is is it possible to have a user defined array refere...
Apr 28, 2019 at 12:07pm
[2 replies] Last: Thank you very much, that helped alot! (by thylath)
by Guil
problem with truncate
 
I would like to truncate a file and to remove the end of the file in this scoop i use truncate ...
Apr 28, 2019 at 11:02am
[1 reply] : Hello Guil, PLEASE ALWAYS USE CODE TAGS (the <> formatting button),... (by Handy Andy)
Adding an image to a microsoft word file
 
I am working on a small program that produces a story and prints it into a Microsoft word file. I'm ...
Apr 28, 2019 at 8:59am
[1 reply] : Well if you're talking about docx files, they're just XML files in a Z... (by salem c)
April 2019 Pages: 1234... 24
  Archived months: [mar2019] [may2019]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.