Beginners - November 2019 (Page 3)

Auto generate id
 
Auto generate id Hello everyone ! I'm new here. I'm trying to auto generate unique id for every patient who register in hospital management system. S...
[5 replies] Last: Thank you so much You people are very helping and very nice people . ... (by umairbilal)
How do I format the accessors and mutators in this Hero and Monster problem?
 
Pls help me. I'm struggling with how to implement the change in health into the respective Monster and Hero. I'm only supposed to modify character.cpp. get_name...
[3 replies] Last: How do I fix this without declaring a new variable within rangedAttac... (by MikeyBoy)
Forward-Link Lists and Inserting Elements
 
This is some code I drew from the C++ Crash Course by Josh Lospinoso I'm using to teach myself c++. Please correct me if I'm wrong, but it seems that an Elem...
[3 replies] Last: In other words why can't we eliminate line 5 and jump straight to lin... (by coder777)
Checking whether odd or even number was inserted into an array without storing user input values
 
Hello. I'm new to C++ and I have a task for my homework to check whether odd or even number was added to an array. All the numbers in it are the same (even or o...
[7 replies] Last: [quote=jonnin]Hmm. what school has TLE on homework problems?! Codechef... (by keskiverto)
Unusual use of << operator… not a bit shift?
 
Poking through the example code of SDFS, I saw the following: static ArduinoOutStream cout(Serial); // F stores strings in flash to save RAM cout << F("\nty...
[1 reply] : The formatted output operator. C++ Standard Library has many for std:... (by keskiverto)
using nested map
 
Hello, I would like to define a map container which includes another map and inter map contains a set so I define it as below: #include <iostream> #includ...
[4 replies] Last: Thank you so much. it works (by glitter)
Loop only printing string once (converted from char and with character inserts)
 
I want the numbers 1-7 to be printed 4 times (4 weeks), and have made code which replaces input specified numbers with a letter. I have written the 1-7 as char...
[no replies]
Cout data in "KWIC" format
 
Hello, I wrote a method that successfully print words to console (reading from a BST and a list in the BST node). For example, I am currently printing the fol...
[6 replies] Last: Thanks Furry. You got it. Let me try to implement it... (by mrpear2020)
by medosz
Hourglass from asterisks
 
I got totally confused with the nestled for statements. I am trying to write a program which prints a hourglass from asterisks: First line: 7 asterisks, next...
[2 replies] Last: Thank you, it helped a lot; #include <iostream> using namespace st... (by medosz)
Access violation writing location. Exception thrown at 0x52CEE39 (uncrtbased.dll).
 
This is a replace function like MS Word. sentence is the original text. ind is the starting indexes of the word which the user wants to replace. (I have already...
[1 reply] : That's obviously not your actual code since it's got a bunch of syntax... (by dutch)
by Ch1156
multiplying a float below 1.0 subtracts from number
 
I'm writing a function to give the player XP and level up, and I set the multiplier to 0.9 and it subtracts from the experienceNeeded instead of multiplying. I ...
[2 replies] Last: I set the multiplier to 0.9 and it subtracts from the experienceNeede... (by helios)
fstream program
 
This code won't open, and I don't know whats wrong with it. #include <iostream> #include <fstream> #include < string> #include <iomanip> using namespace ...
[1 reply] : [quote=littlekid]This code won't open, and I don't know whats wrong wi... (by lastchance)
help creating a vector of classes
 
I am learning to use classes and i want to create a vector of classes. i can create the class and the vector of the class okay, but i cant seem to add to the v...
[11 replies] Last: thanks for the info. i have much learning ahead of me! to be honest im... (by tunplus)
Adjacency List
 
I am trying to print the adjacency list! But its printing wrong data! Its quite confusing because I just have to use loops for it! Its printing wrong data! ...
[6 replies] Last: How would I reverse this code ? i.e from list to matrix (by lost110)
unpredictable results with selection sort
 
Hi, I had this mostly working, but then I messed with it and now I can't figure out what I did to break it. It's just supposed to take an array of numbers, s...
[3 replies] Last: Oh, I'm embarassed! Move the closing brace currently on line 79 to li... (by lastchance)
Do you think my interface is intuitive? If not, how can I improve?
 
I am writing a library which which has an Entityspace. The Entityspace can contain different entities and these entities can be linked (as parent or a child). ...
[2 replies] Last: What happens in entlib::TagType("Ordinary") if "Ordinary" hasn't bee... (by dhayden)
Encryption - Decryption not working correctly
 
So I have a long text file and the Decryption function only reads in 3 lines and I have no idea why. The Decrypt and the Encrypt converts ints to unsigned char...
[3 replies] Last: The ASCII 26 (SUB) was that ended the reading. Now it works... I think... (by Davoda1)
reading file with array
 
ask the user for a course name and see if it is in the array. If found, the program should print “Found at” followed by the index where the value was found....
[1 reply] : > myfile<<courses <<endl; Well you did this to write it. So perhaps t... (by salem c)
classes/vector noob question.
 
Cant figure out why my " a.review() " are not working/outputting anything just zero? any help would be appreciated. and i know my code isn't the best :) SOLV...
[1 reply] : Maybe you should write to the member variables. Review::Review(strin... (by salem c)
Any Suggestions? (Arrays and Functions)
 
My Assignment reads as the following Write a program that reads in a list of integers from the keyboard into an array. The list will be terminated by the value...
[5 replies] Last: #include <iostream> void showMenu(int); int getUserList(int , int); ... (by George P)
November 2019 Pages: 12345... 17
  Archived months: [oct2019] [dec2019]

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