Beginners - October 2019 (Page 6)

Need Help
 
Write your question here. There are some problem going on in the definition of allocateData2DbyMalloc() function which block the memory allocation of a 2D...
[8 replies] Last: there is a way to morph a block to look 2-d without the loop. hang on... (by jonnin)
program to find date of calendar
 
im having trouble to find good approach for this problem. i need to find what day of date in calendar the problem is there are two type of year which are ordi...
[1 reply] : // function to get date and return weekday number [0-6] unsigned getW... (by George P)
by Kenst
Need help the homework
 
/** Among n persons, a superstar is defined as someone who is known by everyone but does not know anyone. The problem is to identify the superstar, if on...
[1 reply] : > there is a more efficient solution that does not require nested loop... (by ne555)
i want program
 
user give date and year of his/her birth and program tells how old is he or she ... thx
[3 replies] Last: I was inspired by Ganado to help out. if your endian is different fro... (by jonnin)
Classes
 
Hi! I would like to ask how to create this to a header file and implement it on a cpp file? This is a linked list code by the way. struct Node { ...
[1 reply] : you make a .h file with include guards, includes, and function headers... (by jonnin)
ASCII I Want To change Size Of Symbol Like "a" To Get "A"
 
#include <iostream> using namespace std; int main() { char c; cout << " Chaweret Sibmbolo : "; cin >> c; cout << " ASCII Mnishvneloba : " << c <...
[1 reply] : #include <iostream> #include <locale> int main() { char c ; ... (by JLBorges)
Help me solve this please :(
 
Hey can someone help me so solve this please in c++ ? :( Given natural numbers m and n. Find all numbers in the interval [n, m], which coincide with the la...
[12 replies] Last: [quote=lastchance]Try the first code here: Awesome code, @lastchance.... (by Enoizat)
error in data.txt file
 
How to read data.txt file by read each single word. for example, Eddy Alfaro Gyrobifastigium Size: 1546 Qty: 78 possibly make looping after that. ifs...
[2 replies] Last: Record 1 Eddy Alfaro Gyrobifastigium Size: 1546 Qty: 78 ----------... (by hein harry thu)
Trying to Track an Infinite Loop (Input Validation)
 
I had a working error validation check in my first program, it went like this: void gpa() { //Variable declaration char grade; //Stores inputted grad...
[4 replies] Last: If your program contains only formatted input, i.e., std;:cin >> aVar... (by jlb)
Filestream open mode
 
If you intend to open an fstream for output in ios::app mode, do you really need to also specify ios::out as well? For my specific compiler, using just ios::app...
[5 replies] Last: Hello TheToaster, Sorry for the delay. I have not been feeling well. ... (by Handy Andy)
Pre-compiled headers?
 
This is an idle question , so don’t go killing yourself over it if you do stuff like that. If I remember things correctly (not extremely likely for me), I...
[2 replies] Last: Thanks! (by highwayman)
How to find the largest and use the smaller numbers?
 
Update: Updated the code to what I have currently. The only thing I need help with is figuring out how after I read in the 3 numbers, how to decipher which is t...
[10 replies] Last: Hello CodeNovice01, Sorry for the delay. When I say your latest code... (by Handy Andy)
Templates: Return different types of data.
 
Hello! I was reading the following tutorial and I have a question. http://www.cplusplus.com/doc/oldtutorial/templates/ In the following code, I tried to ch...
[6 replies] Last: @Ganado, thank you anyway for reading my code. (by Enoizat)
Implementing A Reverse Stack
 
I'm trying to implement a reverse stack where items are inserted at the bottom and popped at the bottom of the stack. I know how to implement a regular stack ho...
[2 replies] Last: What you're building is called a queue or a FIFO queue. FIFO stands fo... (by dhayden)
Math adds up but function does not work correctly
 
Code works with first 4 digit and passcode but does not if im trying to get second 4 digit. #include <iostream> #include <string> #include <iomanip> #inclu...
[3 replies] Last: you need to actually read each line, even if you don't use it, for tex... (by jonnin)
Error: terminate called after throwing an instance of 'char const*'
 
I would like to write a list in .txt, but I understood this problem. Other problem is the function "textcolor" by conio.h that not run and not explicit error. T...
[6 replies] Last: Ok, I understood, maybe I need to change the "while" for "while(!Perco... (by victorio)
Deleting nodes in a linked list with recursion
 
Thanks in advance for your assistance! Problem: I am learning how to use recursion in my code. This particular project is a linked list class with a function...
[2 replies] Last: Aha! Thank you! (by jrbobdobbs83)
FIFO queue demonstration
 
Hi all, Im having some trouble figuring out how to complete a assignment in C++ involving queue, array and FIFO. Hoping someone can point me in the right direct...
[9 replies] Last: @JLBorges hah, thanks for this. I think I understand the whole process... (by wirelesskill)
Random number generator in sets
 
I'm trying to do a random number generator inside of a set,but need some help. It works somewhat because the number generator works, but each random number is t...
[4 replies] Last: I think <random> has unique number options. its rand mod 25 so anothe... (by jonnin)
How do you persist data for next execution of the program?
 
An application creates a file (whose name contains the date) the start of each day and periodically writes binary data to it throughout the day. New data is a...
[5 replies] Last: yea I was mostly kidding. Put it in a little file, and if the user d... (by jonnin)
October 2019 Pages: 1... 45678... 18
  Archived months: [sep2019] [nov2019]

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