Beginners - September 2017 (Page 16)

Creating the key value for entries in a Map class.
 
I am in the process of writing my own map class. Currently the map accepts a key value in the form of a null-terminated string. This key is then converted in to...
[2 replies] Last: Why don't you have a look at the implementatiion of std::hash or even... (by Lucian Valois)
by Tappy
I dont understand .txt file and what is wrong
 
I am trying to load an exam and have it read from a separate .txt file. I don't know how to make it work. I am using Cygwin and have code and have a .txt file. ...
[7 replies] Last: Hello Tappy, Earlier I showed you what main should look like. That ha... (by Handy Andy)
Testing out online IDE
 
I recently got a Chromebook, which I can't download exe's and stuff like that to. So I'm testing out CodeChef. I wrote some simple code that seems like it shoul...
[1 reply] : I can see what you are intending to do, but there are problems with un... (by Chervil)
About letting a loop know when to stop..
 
Hi, so.. i know the code below would produce 20 random numbers between 0 and 1.. but is there any way i can make the loop stop after having 3 consecutive number...
[5 replies] Last: @lastchance Oh wow that's something I haven't expected to see... Thank... (by MeganFox)
Popular Industrial C++ Compiler for Windows
 
I've been using GNU g++ compiler on Ubuntu so far without any issues but now I'm switching to Windows 10 and I'm shocked that no bare version of g++ is availabl...
[11 replies] Last: Thank you everybody, I finally made it. I downloaded the GCC 7.2.0 fro... (by mojtabaavahdati)
DAG Graph problem
 
hello everyone i have some codes to find longest path in DAG graph. problem is when i run the code some errors pops out and i dont know how to fix this``...coul...
[2 replies] Last: i'm using visual studio... and sorry for line numbers i just copied th... (by ETH11674)
Adjacency Matrix
 
SO I know what the adjacency matrix does, but I am stuck on how to implement to check to see if each nodes are an adjacent and return as true if they are in ter...
[no replies]
What topics should I go over to work with templates?
 
So my class this semester started out with template classes in C++ and I feel a bit confused by some of the language and requirements in the first assignment. T...
[3 replies] Last: Thanks, guys (by AJ Wants Your Pizza)
setprecision of a specific value
 
Is there a way to define a number of digits for a number that is not an output? For example, I want to output a result of pi*2*10 for pi = 3.1415926535 which w...
[2 replies] Last: What exactly are you aiming to achieve here? One thing you could do i... (by Chervil)
including unique_ptr in a threadsafe_queue
 
I'm trying to construct a small queue that only pushes and pops unique pointers. I keep getting the following error: error: no matching function for call ...
[4 replies] Last: #include the header which contains the definition of class tcp_sess... (by JLBorges)
Why does my class return not 0?
 
Hello! I'm currently studying classes. And so far I got the hang of it. But I started to experiment somethings and one of those things is this code // ...
[1 reply] : void john(); int john(); std::string john(); those are function decl... (by ne555)
Unable to recive string
 
Hey everybody, I have a problem with the line "gets_s(temp, 80);". the progrem do not able me to enter a string. the problem exist only when I put the line ab...
[3 replies] Last: why you inserted the number "1000" at the function "cin.ignore"? I d... (by Chervil)
c++ program
 
i want to make a program that shows answer of a giving question question is find the five digit number that if we divide the number by 25,30,40, so the r...
[1 reply] : A start: for(i = 10000; i <99999; i++) 10,000 less numbers to test s... (by closed account 48T7M4Gy)
How to search through agrv[1]
 
Hello, I've been stuck on this part for quite some time now. Could someone please point me in the direction of how to search through agrv so that i can change...
[4 replies] Last: @Enoizat, you are right. Just used strlen because the OP also used it,... (by Thomas1965)
2048 game problem
 
Hi, I've got one question. Imagine that you are making 2048 and you want to chceck whether game is over (what means that there are no empty places on the board...
[6 replies] Last: I highly appreciate your help guys. Lastchance's program did the job f... (by david73)
How do I round up?
 
Hey, I recently started taking a c++ course and I am having problem rounding up what I am trying to do is round up to ten decade (ten's (sorry for the English)....
[6 replies] Last: Rounding is a way of solving an inequality . The way you round depend... (by Duthomhas)
calculating the area of a square, circle, and rectangle
 
Hello all, I am having an issue with my inheritance problem that I need help with. Everything is working except for my rectangle solution. Every time i biu...
[8 replies] Last: Thank you to goldenchicken and Enoizat for their very good looks into ... (by Jdawg32)
Reading input from a text file
 
So I have a text file like this: John 15 10 Jane 20 25 Dan 10 30 Sam 23 45 Ann 9 50 So far the program works, the only thing is that when I ran it, the ...
[1 reply] : Place output inside the while loop. (by Hengry)
Beginner at C++ really struggling w/ Vectors
 
Any help that can be given is greatly appreciated! This is my first C++ assignment and I am really struggling with getting it to print correctly. Long story s...
[2 replies] Last: Thanks! This really helped me get an idea on how to pass the vector a... (by jpauly1)
by aedt
Declaring function signatures of friend functions
 
Functions that are friend to different classes have to be declared within the classes themselves. This poses the same problem as using "magic literals" instead ...
[1 reply] : > My question is how one can avoid this error-prone, tedious work? Lo... (by JLBorges)
September 2017 Pages: 1... 1415161718... 21
  Archived months: [aug2017] [oct2017]

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