Beginners - January 2019 (Page 9)

?!?! Ideas Anyone !?!?
 
Was wondering if someone could give me any ideas, tips or starters on this problem: Prime Time! – Write a program that computes and prints the nth prime nu...
[18 replies] Last: @Grime, Here is a simple implementation of the sieve. Even in this un... (by dutch)
by AL88
What am I doing wrong with these logic gates?
 
I am trying to write a program that takes a poll on favourite colours from 10 different users but i can't get the logic right for 5 each of 2. Please show me wh...
[4 replies] Last: #include <iostream> int main(void) { int a=8, b=8, c=0; s... (by Cheddar99)
Problems with Vectors in Microsoft C++ (1,2)
 
I'm having a problem using STL vectors in Visual Studio 2017. I know there are some differences in Microsoft C++ and other versions but I can't believe that th...
[23 replies] Last: It happens. Now you know what looks like one problem can be something... (by closed account E0p9LyTq)
Programming Ending without meeting both criteria
 
So, I have this assignment and basically, I need to run the program until all seats are sold out of both halls. However, the program stops after one hall sells ...
[6 replies] Last: Sorry I should've explained better I did that and what JL said. When I... (by glasseater)
Newton's Method
 
Hi, I have a written the code for Newton's method by using the Pseudocode from my professor. The problem is I can't see why it doesn't provide the output. ...
[5 replies] Last: debugging just shows you what is happening. it does not omit anything... (by jonnin)
String
 
I donw know how to make a program that allows a user to enter a word and then The program desplays the word user entered. Can someone help me? Thanks
[2 replies] Last: Thanks. It helped a lot. (by Mister H)
Need help !
 
Hi, my son needs help. There is a fault line 7 and still? 1 #include<stdio.h> 2 #include<math.h> 3 main() 4 { 5 int A 6 ;float x 7 ;printf("unesite broj") 8 sca...
[2 replies] Last: Thank you (by majstor)
by Kiryu
Why does the following snippet not compile?
 
struct A { virtual void method(int) {}; int method() { return 0; }; }; struct A_child : public A { virtual void method(int) override {} }; int main() { ...
[3 replies] Last: The issue isn't just that they are the same identifier, that's call ov... (by Ganado)
Sweep line algorithm
 
https://www.hackerearth.com/practice/data-structures/trees/heapspriority-queues/practice-problems/algorithm/theatre-830bdbff/description/ My approach is givi...
[4 replies] Last: I saw data structures written (by closed account 1vf9z8AR)
by ksau
Function pointers drive me nuts ;-)
 
Dear experts, I have a widget class that displays values on a dashboard. These values are generated by several other classes measuring different stuff. While...
[4 replies] Last: Very cool, thank you all for the quick replies! I will now try to unde... (by ksau)
How to (set size or resize) and fill: Two dimensional string array inside a function?
 
Hi I need to make a function that modify and write, a two dimensional string array passed as an argument. The two dimensional array size will be set inside ...
[2 replies] Last: @salem c (293) thank you very much! it works perfectly, and very profi... (by vincentthorpe)
Average line from a text file???
 
I'm very new to C++ and I have an assignment that has to do with reading in a text file and finding the average of each line. Then pushing the final scores to a...
[2 replies] Last: This may not be quite perfect, and salem's code looks easy to follow, ... (by Cheddar99)
Best way to store records / fields of csv-files in memory?
 
Hello, my csv-file has 1000 records and every record has 15 fields separated with "/". Now I want to analyse this data and I'm not sure how I have to store t...
[6 replies] Last: omg ...yes I remember ... I read it ... about heap und vectors but I f... (by formatyes)
by ace184
Would an if statement work here?
 
I am trying to figure out how to make a user input a certain number of students and certain number of classes. Say 3 students and 5 classes and if they dont, it...
[4 replies] Last: > I am having trouble on figuring out just how to write and implement... (by JLBorges)
What do you do when you don't know how to solve a problem?
 
I don't mean how,to code the solution though. I was looking at spoj this morning and I forget the problem but the answer was done in a simple for loop. I know h...
[12 replies] Last: Lol oh. The only one I have right now is introduction to algorithms. I... (by bscruggs99)
?? Non-Repeating Random Number Array ??
 
Is there any way to create a number array that prints out 20 random numbers with no repeats? Could it be done starting with the code below? #include<iostrea...
[5 replies] Last: - Create an array from 1 to 100. - Select a random index into the arra... (by dhayden)
Tetris Help
 
I am trying to start a project that makes the game, Tetris. For this part, I need to generate seven unique 2-dimensional arrays that will represent Tetriminos (...
[9 replies] Last: I can't use classes to make the Tetris game. I have that code because ... (by Maxster)
Facing problem in structures
 
Hello guys! I was studying structures. Kindly see the code below here. So it is taling information from user and displaying it! Now how will i modify it to tak...
[14 replies] Last: Regarding the original problem, let's start by moving the reading and ... (by dhayden)
Is it possible to create a template that accepts type T which is an object or pointer to an object?
 
Hi guys, So I am wondering is it possible to create a template that will handle two different types simultanoulsy. For example: class Point { publ...
[8 replies] Last: Thank you for explanation, that was very helpful. (by Unspoken)
by Bopaki
This program works fine if I work with numbers but not with strings
 
If the variables are numbers I get the expected output but if the variables are strings it bombs out. #include<iostream> #include<string> using names...
[2 replies] Last: Okay it now works fine. I changed the template type to void and every ... (by Bopaki)
January 2019 Pages: 1... 7891011... 17
  Archived months: [dec2018] [feb2019]

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