Beginners - November 2020 (Page 3)

How to ?
 
Hello im having a little problem. I need to make a program in which i enter a number between 3 and 1000 and make an array with that many elements in it . Then i...
[6 replies] Last: #include <iostream> #include <string> #include <set> using namespace ... (by lastchance)
understanding character pointers
 
I was expecting the cout to print addresses since b and d are pointers, but only b prints the value and not the address, why is that? int main() { char ...
[2 replies] Last: Just cast b d to say long int (or long long int for x64). It will then... (by seeplus)
Class definition?
 
I am to write program using a class definition "Bag". I am new to class definition and don't quite understand them. The program is supposed to allow the user t...
[2 replies] Last: to allow the user to enter a item until the user wants it to stop, a... (by seeplus)
How I can go it?
 
Using the code, I determine the numbers divisible by a given divisor, but you need to output what exactly these numbers are. How to do it? int GCD(int a, i...
[5 replies] Last: Thanks for the help. I used your output and framed in my code and ever... (by chebyrek)
by Walkup
Trouble w/vector and while
 
I am going through C++ Primer (Lippman) and am in chapter 3. Exercise 3.17 reads as follows: Read a sequence of words from cin and store the values in a v...
[10 replies] Last: [quote=jlb]it'll make your cod much easier to read. I'm not sure this... (by MikeyBoy)
Problem to write CGI variable to a log file
 
Hi everyone! I'm new here:) I'm trying to write just received CGI variable to a log file. CGI script doesn't create this file. I run the script by clicking h...
[5 replies] Last: Problem is solved. My fault was an unavailability of the log file with... (by spistol)
I have array and I need display numbers divisible by the same number?
 
How to deduce from an array of numbers divisible by the same number? I understand how you can determine if two numbers are divisible by the same thing using Eu...
[6 replies] Last: If you want to store the numbers, then using a map: #include <iostr... (by seeplus)
How to make output AND,NOT,OR,XOR
 
I want to make output AND,NOT,OR,XOR: S = ++G * H < D > 100; J = --G + D * H < 100; K = ++S + --J * G > 200; L = S + J + K > 150; The question is: why the outpu...
[8 replies] Last: > Make logical operator AND,NOT,OR,XOR: What do you mean 'make'? Are ... (by salem c)
explain the code please
 
so i have a code here, could you please explain what these brackets do "{}" (not the ones after int main() but the ones as in sp{ test.find(' ') } etc ) als...
[3 replies] Last: thank you so much, this helped a lot!! :) (by laura fidarova)
by Leevi
Do While loop breaks when typing charecter
 
I don't know if it is a bug or if I'm wrong but someone please help me. I encountered this problem with a bigger program of mine and narrowed it down to this pr...
[2 replies] Last: Hello Leevi, To expand. Formatted input, i.e., cin >> test; , means... (by Handy Andy)
by Cintru
Creating a " triangle row" using arrays
 
How do you make a program in which you must submit a number N which can vary from 3 to 100 or N Є [3 ;100 ] And you make an array submitting elements inside it...
[2 replies] Last: it works well enough , thank you ! (by Cintru)
printing out box issue - explanation needed
 
Hello, first of all I would like to say I know how to solve the issue I am having but I just cant figure out why it is happening. The code is pasted below, and ...
[7 replies] Last: Thank you for the replies. I was mostly looking for an explanation abo... (by DonnaPin)
by yem
Casting Strings as Ints
 
Hey, So I need to hash and my key is a string. What would you say would be the best way to convert my key to an int for my hash function? Thanks
[11 replies] Last: Or as C++: unsigned int hash(const std::string& str, size_t mod) { ... (by seeplus)
Creating a POS Receipt
 
Hello everyone! I would like some help on a program I'm currently writing. I need to display a receipt that shows 4 items with their quantity, unit price, and t...
[4 replies] Last: Hello colinseven, This is only set up for 1 input, but it should give... (by Handy Andy)
by tgp23
10x10 Battleship game 2d array issue
 
Hello all, I am currently working on a C++ battleship project but this seems unique to many of the others I have seen on here. My professor never explained 2...
[6 replies] Last: Hello tgp23, Things left, commented our, are there so show why they a... (by Handy Andy)
Making a calculation based on the operator a user inputs
 
Hello, not sure how to go about solving this. cout << "Enter the first number: "; cin >> numberOne; cout << "Enter the second number: "; ...
[3 replies] Last: switch requires an integral type. Even a char array won't work with a ... (by George P)
I would like your opinion on this code
 
Hello everybody. This is a sudoku with 2d array. It prints it calculates and it almost solves itself. What do you think about it? What am i doing wrong? Is the ...
[2 replies] Last: The sleeping,i thought would break the pattern the random numbers have... (by closed account o35DwA7f)
passing pointers to object in C++
 
Write your question here. Please help C++ greenhorn navigate the task and learn how to pass pointers to an object. My objective is to put an information i...
[5 replies] Last: CCC_LocalAdapters *LocalAdapters_info = new CCC_LocalAdapters(QList<Q... (by MikeyBoy)
Creating an appointment scheduling program using queue doubly linked lists
 
I am trying to create a code to create an appointment at a hair salon using queue doubly linked list. The hours of operation of the hair salon is from 9:00am-4:...
[8 replies] Last: And if you modify that code in the above sample to bring it into line ... (by againtry)
November 2020 Pages: 12345... 14
  Archived months: [oct2020] [dec2020]

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