Beginners - April 2019 (Page 3)

Strange off by 1 error
 
I'm running CodeBlocks 17.12, it's never given me any problems (I've only been using it for a semester though) and now all of a sudden it's giving me this weird...
[9 replies] Last: Dutch you are correct my friend. Using the global pow and not the stan... (by TheLilEngineerThatCould)
Guess Number Game
 
I created this code to make a guess number game, I noticed that whenever I type in "y' to play again the random number is the same as the previous one. Is there...
[1 reply] : Should put your code inside code brackets, [.code] [./code] (without t... (by zapshe)
Filling every odd index in array
 
Hello everyone! First off this is my first post so sorry if it's a tad out of touch with how the forum works! Anyway, I am currently trying to fill a 64 leng...
[2 replies] Last: You sir, have done me a solid. Thank you!! (by StayingInside)
How can I implement an abstraction into this colde?
 
My code is almost done but College Board is being a bitch again and requires an abstraction for me to get a good grade but my code is working fine without it an...
[3 replies] Last: And do you know what they mean by "abstraction"? It's a pretty general... (by Ganado)
Create a Class to Calculate Students' Average Grades
 
Thanks to the gracious help of a community member last week, I was able to complete a program that involved reading in a list of 40 students and 7 grades for ea...
[1 reply] : Modify the Week 13 Program to use a class called Student which has a n... (by acscicplusplus)
Evolution sim program (finished)
 
Lemme know what you think and give me some tips on how to optimize it. Fiidback is necessary. #include "pch.h" #include "AILogic.h" #include <iostream> #inc...
[1 reply] : - Any time you see yourself creating variables named var1, var2, var3,... (by dhayden)
Overload + operator to append node to linked list
 
I wrote the code to overload the + operator to append a book class node to a bookshelf class linked list, and the compiler says there aren't any errors with it....
[3 replies] Last: Oh I see what you mean! Thank you so much, I understand how the overlo... (by atn170001)
Certification programs?
 
Soo, yeah. I posted this question last night and I am not sure what happened to it, weather there was a problem with what I said or if something else happened. ...
[8 replies] Last: Not everyone has told you certification is useless...and a degree is j... (by closed account z05DSL3A)
How should I use exception handling in this class?
 
Hi I have a class E, which overloads the operator to return the object at that index position. To deal with an index which doesn't exist, I have: throw ...
[1 reply] : If you want to check all index accesses, it makes sense implementing... (by nuderobmonkey)
Array of char vs. array of ints
 
Hello, working on arrays, when I noticed that an array of ints didn't behave the same way as an array of chars. What is happening here? I was expecting the sam...
[11 replies] Last: Take a look at what character the number zero represents: http://www.... (by Repeater)
by wuwy
Don't spaces count as symbols?
 
I got this exercise and i'am trying to read all the data from file, but it fails and throws junk values. This is the data I'am trying to read: 7 Petras A. ...
[18 replies] Last: But I couldn't get it to correctly read the data Garbage in / garbag... (by dhayden)
by DadamE
apprx pi calculation "expression must be a modifiable value"
 
error "expression must be a modifiable value" ... Calculating pi for 10,000; 20,000; 30,000 .... 100,000; Getting the "must be a modifiable value" on the i...
[2 replies] Last: oof, I see, missing the second = Thank you so much! (by DadamE)
by JayGln
Linked list with multiple data types
 
I am trying to write a linked list that will store a type double(prices), a type string(product name), and an int(barcode). The basis for this is that I am maki...
[6 replies] Last: enums are just a way to name and group constants. enum {x,y,z}; is... (by jonnin)
Priority queue using heap
 
can anyone give me an algorithm or any idea of making priority queue using heap.
[1 reply] : there are 2 ways to do these. 1 -- have a vector or other container o... (by jonnin)
struct cast
 
I don't understand bellow code. Can you explain it (line 16 )? or share for me some material about it? What is it call? Thanks all. #include <iostream> usi...
[3 replies] Last: There is no cast from Context to ACB in that code. [quote=I]The C-styl... (by keskiverto)
Type Conversion of class to another
 
Hello guys! Here is the task : "Write another class Person having the following attributes: 1. String name 2. Integer Age Convert an object of type Employee ...
[3 replies] Last: My Person is not an employee. (by keskiverto)
RNG
 
There was once a time in my life when I could wright an RNG that used the <random> and <chrono>. it looked something like unsigned seed; m19937(seed)syst...
[3 replies] Last: #include <iostream> #include <chrono> #include <random> int main (){ ... (by anup30)
double vs long double in calculations (1,2)
 
Greetings, I would like to run my physical simulation with larger precision so I intend to exchange my double variables to long double variables for a first tr...
[24 replies] Last: the butterfly effect @Ganado Please have a look at this bifurcation... (by MikeStgt)
Roll the Dice System
 
Hello Everyone! I am now trying to find a way to create a way for users to Roll the Dice in the program after choosing a certain number of sides. Here is part ...
[1 reply] : If you're talking about rolling dice, then I assume you want a random ... (by Ganado)
Too many error outputs
 
I was able to create this code, but when I tried to put in a sentence of 6 words, the command, std::cout << "An error has occured. Please enter 'help' for more....
[2 replies] Last: Yeah, I figured it out before. Thank you for your assistance anyway, j... (by BeastSlayer299)
April 2019 Pages: 12345... 24
  Archived months: [mar2019] [may2019]

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