Beginners - December 2018 (Page 21)

Codeforces 734A not working properly
 
It does compile, but if I put 4 AAAD, it shows friendship and if i put 4 ADAD shows Danik,but when i type 4 DDDA shows Danik, as it should. Whats the mistake? ...
[1 reply] : You probably would've gotten help earlier if you had described the pro... (by tpb)
Looking For Help With Reversing the Order of an Array
 
In the below code I am attempting to print the reverse order of array1 by first storing the reversed contents into array2 and printing array2. If it was simply ...
[4 replies] Last: If you are not required to write your own reverse function, <algorith... (by closed account E0p9LyTq)
Need help with restaurant homework
 
So I'm cluelessly lost. I'm not asking for someone to do my homework for me, I just kinda need a pointer in the right direction. The homework assignment I'm wor...
[3 replies] Last: Hello PhoenixBlain, You are welcome. Your missing comma was a proble... (by Handy Andy)
Don't know what I'm doing wrong
 
I am prompted to make a class named "secretType" in which it must include private variables: name of type string, height of type double and age and height of ty...
[3 replies] Last: They need to match exactly, including the const at the end and the ret... (by tpb)
expression must be an lvalue or function designator
 
FacadeSocket::Con returns a Connection object and FacadeSocket::Con.getSocket()returns a SOCKET. Basically, I am trying create a reference to a Socke...
[10 replies] Last: Does this look like it should work to you? It's basically the same pro... (by tpb)
Matrix server printing garbage values
 
Hi, I'm having an issue compiling my program on Matrix. The issue is with the goodType variable which is a private data member of the Good class. In visual stud...
[7 replies] Last: The copy constructor is calling the overloaded assignment operator, wh... (by robbieD7)
casting a void pointer to an int.
 
Hi guys, so I thought I casted a void pointer to an int the right way,but obviously not, so first I converted the ints to void pointers in sortAcsending, once...
[1 reply] : Why are you using qsort() in a C++ program, when there are better alte... (by salem c)
Subroutine and bool
 
Can someone explain to me how this program works, I've already ran it and got the results but I don't understand how it works, especially the bool part. ...
[5 replies] Last: i agree with @tqb , it is a confused piece of code lol, get a nice beg... (by closed account SECMoG1T)
what is meant by a pointer goes out of scope ?
 
what is meant by a pointer goes out of scope ? what if i store that pointer as field within a class ? will it still go out of scope ? class Con...
[no replies]
by Bopaki
What do these errors mean because I see nothing wrong in the program
 
I get these errors when compiling my program: C:\Martin\Savitch\SavitchDownloads\Chapter11\Display11.3.cpp:162:2: error: stray '\342' in program C:\Martin\Sav...
[3 replies] Last: You often get "stray xxx in program" when you copy/paste from some web... (by salem c)
Making this structure using 2D Array
 
https://imgur.com/a/Ragasr3 How can I make this?
[1 reply] : If I understand your question, it's probably best to only store the pa... (by tpb)
Word
 
Could you please write a program that reads and writes a word. Thanks!
[1 reply] : #include <iostream> #include <string> int main() { std::string w... (by JLBorges)
Codeforces 1080A
 
So I'm trying to solve problem 1080A from codeforces: "Petya is having a party soon, and he has decided to invite his n friends. He wants to make invitations in...
[1 reply] : The number needed is: number of red notebooks needed + number of gree... (by Repeater)
I found difficulty in friend class for High Card Game program
 
I need to write a C++ program to perform a high card game However, when I write for friend class, VS2017 display many errors in my friend function. I have no ...
[1 reply] : First problem I can see is on line 85 - compare with line 88 where you... (by Thomas1965)
Split single file into header and source fioles
 
Write your question here. #include<iostream> #include<fstream> #include<string> using namespace std; template <class T> class Node { private:...
[15 replies] Last: [quote=nowy20180820]When i create new class in Code::Blocks from wizar... (by Peter87)
Rehashing a hash table with quadratic probing
 
Hi everyone, I'm doing an assignment which requires me to create a hash table using quadratic probing as a way to resolve collision. Moreover, the assignment a...
[no replies]
Array Processing
 
I am working with arrays and I need to figure out how to get the minimum amount of change with 50, 20, 10, 5, 1, with two loops, and display the change in a hor...
[4 replies] Last: Got it to work! If money = 1, then "while(money > bankNotes[element 4]... (by stoneJax)
How Does this Recursive Function Work?
 
How can you tell that the first and last letters and each inching letter after that are equal to one another through this program? I don't get the "if (end - be...
[4 replies] Last: @tpb So, I have some questions about your code. So, why didn't you d... (by JesusFreak43)
by Bopaki
Getting an error on filling the array
 
I get an error that says: C:\Martin\Savitch\Chapter7\Display13.14.cpp:48:50: error: cannot convert 'int (*) ' to 'int*' for argument '1' to 'void fill_array(in...
[2 replies] Last: Thank you very much salem, its now fixed, It is now giving the desired... (by Bopaki)
AVL trees
 
Hi I'm working on this right threaded AVL tree and I can't seem to get my right rotation working properly. Some issue with the threading. If anyone can find it ...
[no replies]
December 2018 Pages: 1... 19202122
  Archived months: [nov2018] [jan2019]

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