Beginners - December 2021 (Page 3)

Class Not Being Recognized/Won't Declare Objects
 
I created a class 'Rectangle' under the header file 'Rectangle.h' as part of a build that I am doing. However, when I try and declare an object 'box' using that...
[7 replies] Last: The conflict is not with a C++ library function - but within windows.h... (by seeplus)
Make a search record for string of the array (1,2)
 
I tried to make a search input record of words based on a string and I couldnt figure it out. Here is what I want to make a search record as I describe: "Once...
[20 replies] Last: This should compile cleanly. Caveat: I've not tested it; not even run... (by JLBorges)
initializing vector of lists with already initialised lists
 
I wonder if I can shorten the code by someway initializing the vector of lists with predefined lists already in the same initialization (sorry if my question is...
[6 replies] Last: [quote=ragnarokas] I've read that list is better than vector if many n... (by kigar64551)
by Amin96
need help in counting the elements
 
how to make it count the even digits. and am I doing anything wrong ? Scanner input = new Scanner (System.in); int n; int even = 0; System.out.pri...
[15 replies] Last: Write a program that count until we got 5 numbers multiple of 3 (the ... (by againtry)
.
 
...
[5 replies] Last: salaman125 strikes again deleting his original post. (by AbstractionAnon)
Need help with C++ compile/linker
 
Hi, Basic lack of knowledge problem I installed gmp on my Raspberry pi and am having trouble getting an executable. Here's what I've done.... Raspberry ...
[2 replies] Last: ... and you need to include the gmp header in your code... #include <... (by newbieg)
How do i access a member in a structer that has an array?
 
[Im not sure how to access my members that have arrays. Ive tried for loops and every other way I know how but soon as i add the members with arrays to the func...
[10 replies] Last: Thanks !! Ill try that! I was thinking I would need a separate functio... (by ReeseeCup93)
by Ganado
Homework assignment help (easy task)
 
What have you tried so far?
[1 reply] : #include <iostream> #include <valarray> using namespace std; int max... (by lastchance)
Game of Life combined from several grids
 
I am experimenting with various implementations of Game of Life algorithms. Currently I want to implement it in such way: - using int and storing 8x8 grid va...
[12 replies] Last: Just in your line 13 I believe should be N/8, not N. D'oh. You are r... (by kigar64551)
The while loop is adding values
 
Hi all, I'm creating a dice game where I want the user reach limit of 10 game or game terminates when there is no more money left. it seems that most of ...
[4 replies] Last: ok, I have change a bit to swich and cases: sorry the code has a bit o... (by alanfromeurope)
I am getting Build Failed error
 
PLEASE learn to use code tags, they make reading and commenting on source code MUCH easier. http://www.cplusplus.com/articles/jEywvCM9/ http://www.cplusplus.c...
[2 replies] Last: This compiles - not tried: #include <iostream> #include <string> u... (by seeplus)
Linked List Trouble
 
I'm having trouble displaying this linked list I'm trying to build. I have 2 functions so far to append and print. But all it is returning is a single 0. ...
[6 replies] Last: Perhaps: #include <iostream> struct LinkedList { int value {}; L... (by seeplus)
C++ Program Help
 
Write C++ Console Application program that calculates a worker’s net earnings per week. The net earnings are calculated based on the following requirements: ...
[2 replies] Last: and your c++ question is? What help are you after? Have you already pr... (by seeplus)
by ALNLAA
How to find the size of a char array
 
I want to have a char array and work with every letter separately. How do i check how many letters a char array has? I thought sizeof(name)/sizeof(name ) would...
[6 replies] Last: > I want to have a char array and work with every letter separately. >... (by JLBorges)
Problem for School Activity Switch Statement
 
Write your question here.. Greetings! I am student taking up a course in c++ programming, and i have an activity where in i need to solve this problem : Co...
[3 replies] Last: What's messed up? Are you reading the file OK - display what's been re... (by seeplus)
Tracking User Input Using an Array
 
This is my code for using an array to track user input into a menu switch and sending the data to a .txt outfile. Thank you to all of those who helped with this...
[15 replies] Last: Oh got it. Will definitely do that next time. This was my first post s... (by bbailey)
Create Hand from Deck class without creating new deck object each time a hand is made
 
I am creating a Black Jack card game. What I am trying to do is create a hand from a deck object without creating a new deck each time I create a hand. I just w...
[15 replies] Last: @ seeplus Furry Guy renamed himself to George P :+) (by TheIdeasMan)
Function not operating
 
My function for the "getbasefees" is not running correctly. When I run my program the only output is the else statement, or "200". What do I need to fix to get ...
[4 replies] Last: Your indexing for linargs doesn't match the file layout. TypeOfVehicle... (by seeplus)
by mnm71
Get Two's complement of double
 
How can I calculate two's complement of c1? double c1 = (ADC_CH1 << 16 | ADC_CH1 << 8 | ADC_CH1 );
[1 reply] : "Two's complement" can mean two things: 1. The binary format in whi... (by kigar64551)
Pointers
 
Hi, folks! I just stuck with book exercise. Here is exercise: 8.4 For each of the following, write a single statement that performs the specified task. Assume...
[1 reply] : No idea what you're asking. What statements and what function? (by zapshe)
December 2021 Pages: 12345... 7
  Archived months: [nov2021] [jan2022]

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