Beginners - May 2021 (Page 7)

How to create a program to output a certain length of word
 
I am working on a program where it is supposed to output a certain length of a word whether it is minimum length or maximum length. The one thing I'm currently ...
[16 replies] Last: #include <iostream> #include <fstream> #include <ctime> #include <str... (by againtry)
Variable Sized Arrays - hackerrank question
 
I am doing questions on hackerrank, and got to one i couldnt figure out so i had to look at the answer, but that has not helped much as some of the code looks u...
[3 replies] Last: yes. (by seeplus)
Testing atomic lock
 
Hello everyone, I tried to implement a mcs lock. Now I would like to test if it works and how it behaves in different situations. After playing around with t...
[4 replies] Last: Ok, thank you for the explanation, I will try to keep it simple. (by qwertz88)
Calculate Total Price and Directly Insert into Database
 
Hi, I want to calculate total price but the variable is string. Reason why I use string is I need to put the total price directly into database which is string...
[1 reply] : Well you store it as an int or a float, do your calculation using regu... (by salem c)
RNG Function
 
It's been quite a while since I last programmed but trying to get back into it so I'm sure I'm missing something obvious but see below: #include <iostream> #in...
[4 replies] Last: Thank you both - My world has been stuck in Excel/VB for the past few ... (by edge6768)
Release vs Debug
 
Hello everyone, I have more general question. I am runnig my code in Debug and Release version in c++ visual studio. The code does only aritmetic tasks such a...
[2 replies] Last: default 2019 release on a modern machine is very, very fast. Its your... (by jonnin)
Movement script
 
Does anymore know how to write up a movement script for a box2d C++ code. I literally have no idea how to code it
[2 replies] Last: No this is for something else. I'm trying to make a 2d platformer game... (by Raees224)
insert a template class issue
 
hello developers, I have a problem. I'have a library about RedBackTree.h. It is a template class and I'm creating a series from that class (RedBlackTree<Employe...
[5 replies] Last: you saved my life thank you (by gkrm123)
Learning parameters and classes. Guide me to do this question.
 
For this question: Write a class with three integer attributes specified as public. Using a parameterized constructor assign values to these attributes from the...
[7 replies] Last: Initialization and assigment of basic types, like int , is not much d... (by keskiverto)
Cannot increment with greater than condition
 
I have two different random values, and each time the loop iterates a value will be greater than another and increment incr1 or incr2 . My problem though is tha...
[3 replies] Last: Whether a variable is defined inside or outside of a loop depends upon... (by seeplus)
by levo
Help
 
Hello people i need help for an exercise. Im from greece so sorry if the translation is bad. A table of Cnxm real numbers is given. Write a C ++ program that:...
[10 replies] Last: When I did my school 'A' levels (at 18, Computer Science, double maths... (by seeplus)
Line2D Undefined Reference
 
I am writing a program that sorts data. Point2D and Point3D has no problem reading data and storing it as an object. However, if I try to read in Line2D or Line...
[1 reply] : Where do you define the Point2D::Point2D() constructor? You have th... (by Ganado)
. (1,2)
 
in this code, I've made the code to accept only two numbers to check whether the elements in the array is in sequence or not. how can I change this code so tha...
[20 replies] Last: Depends how long you want to spend searching for 1000001 elements of s... (by lastchance)
PLEASE HELP
 
Consider the following implementation of the node and linked-list: template <class type> class node { public: type info; node *link; }; template <c...
[2 replies] Last: For the provided implementation, there are some issues. A copy constru... (by seeplus)
List Initializer in max - STL - C++
 
Hello, How can I fix it? Thanks #include<iostream> #include<algorithm> using namespace std; bool myComparsion(int a, int b) { return a < b; }...
[1 reply] : You want max_element. https://www.cplusplus.com/reference/algorithm/ma... (by salem c)
Student needing help please in my C++ class (1,2)
 
I am having an issue with this assignment. Write a program to help a local restaurant automate its breakfast billing system. The program should do the followin...
[21 replies] Last: I finally got it working properly I had to go changes some stuff aroun... (by XzainKarrito)
by spicyz
Needing help with functions.
 
I was wondering what the best way would be for me to put my code into functions would be. I'm still trying to understand how they work. #include <iostream...
[4 replies] Last: Hello spicyz, I found why this looks so familiar. If this is a schoo... (by Handy Andy)
by abuh
please help me
 
1-Includes a function “Display” to display the field values for each order that the item_price is greater than JD 100. 2-Includes a function “Search” t...
[4 replies] Last: Customer number as a double?? When passing string as a function param... (by seeplus)
C++ - Error in Overloading ostream
 
Hello, I have an error when I'd to return output. (in Visual Studio 2019) #pragma once #include<iostream> class rational { rational(); rational(...
[3 replies] Last: #include <iostream> class rational { public: rational(); rational(... (by salem c)
by alexas
pointer madness
 
I have a problem with pointers. I always used the references and have a hard time to adapt to that * or ** or ***. I read the theory but could someone help me w...
[6 replies] Last: thanks. it is hard to show the whole code, but I will try to illustrat... (by alexas)
May 2021 Pages: 1... 5678910
  Archived months: [apr2021] [jun2021]

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