Beginners - July 2019 (Page 8)

by mcclit
Printing out the contents of a vector
 
how to print out the contents of the vector? I have stored the contents of a file into a vector that also connects to a class, is it easier to print out a vecto...
[1 reply] : #include <iostream> #include <string> #include <iomanip> #include <ve... (by JLBorges)
How to Solve Prime modullo
 
x^2 = a mod p y^2 = b mod p the known values are x,y,a,b . we have to find p . p is a prime and ranges from 2 to 10^9 . I could not get any idea to solve . ...
[8 replies] Last: Homework is about learning to program. Competition puzzles seem to be ... (by keskiverto)
Confused
 
Hi all I'm really struggling to wrap my head around this. I am going through the word jumble game and this section is causing me a lot of problems enu...
[4 replies] Last: Ok, thank you again for your help, it's much appreciated (by Zainyorkshireman)
Comparing ints within a while loop (maximum and minimum)
 
Currently I am working on a project for uni (so just tips please) about ordering desks. Currently I've been stuck on how to make it display the least expensive ...
[8 replies] Last: Alright, got it fixed! Sorry for the late response, I've been really b... (by saturnz)
by jonnin
parity problem
 
the properties of xor ... i believe you can count as you go. pick a number. insert it: 3. that is 0011 in a 4 bit int. e is 1, and o is 0. pick another num...
[19 replies] Last: Now that I see the proposed topic of conversation, I'm not particularl... (by dutch)
Passing method pointer or function pointer as a template argument.
 
Hello, I have a class template: template<typename Callable> class MyClass { void CallFunction() { Callable(); } }; This works fine wh...
[8 replies] Last: As far as performance for your requirements go, do not rely on opinion... (by JLBorges)
Using or runnig a written code
 
I found a code that is shared on the internet performing my demands. I downloaded it. It is a folder that includes some cpp and h files. So how can I run this c...
[2 replies] Last: and it depends on what it was. It may be unix code, it may not have a... (by jonnin)
by xelly
Logic/math error?
 
Hello, I recently started an intro. to C++ class and am having some issues with a few of the online assignments. My code compiles but is not returning the expec...
[5 replies] Last: The problem is in your math. First: after marking up the price of an... (by dhayden)
by jonnin
Take large input
 
you need a third party large integer class, such as provided by boost, to handle huge numbers. however, every problem like this I have seen has a solution wher...
[2 replies] Last: @jonnin is absolutely correct you don't need to put whole question he... (by lazybot)
Input file stream: "Incomplete type is not allowed"
 
Alright support personnel, Going through my file streams and I am intending to open a file for reading integers as the exercise details..... well I'm using t...
[10 replies] Last: Thanks Gentlemen. Really appreciate the extra details you gave for fi... (by Xanadu4ever)
Exception
 
I dont understand try-catch-throw thing.. Please somebody explain it to me Thanks..
[4 replies] Last: Another example. #include <iostream> #include <string> #include <ex... (by dutch)
Grammars and parsing
 
Hey guys, I'm reading Bjarne's practices and principles and decided to attempt an exercise, the exercise is write a basic grammar to evaluate an English langua...
[3 replies] Last: Thanks guys, Dutch I will check out them links :) Andy thanks for th... (by adam2016)
what is the function of cin.ignore and cin.get at the same time?
 
what is the function of cin.ignore and cin.get at this program? location : 57-58 #include <iostream> #include <stdlib.h> using namespace std; char s...
[5 replies] Last: oh ok guys thx, i understand a litle bit (by unknown1412)
by kijsee
Random dice game c++ help
 
Hi! I'm new to programming and need some help looking over the code. There are a few things that need to be included (see list below) and I'm wondering how ...
[2 replies] Last: *The dices can be symbolized by predefined randomfunction. No need fo... (by closed account DLw0Djzh)
by Mur54
Need help for basic code
 
Hello, there is my program : #include <iostream> int main() { int currVal = 0, val = 0; if (std::cin >> currVal) { int cnt = 1; ...
[4 replies] Last: Hello Mur54, Good use of code tags for just starting here. Lets pick... (by Handy Andy)
by Bopaki
Why is this program not printing out the list
 
When I try to print the program I get nothing Enter a list of integers ending with -999. 12 45 76 89 -999 When I press "enter" to print the list I get...
[4 replies] Last: Thank you very much coder777 It worked first class after rempving *fir... (by Bopaki)
Can someone please help
 
IF you run this code you will understand what I am trying to say. The two columns that are displayed when you run this code is distance and time. The time colu...
[14 replies] Last: Values are made up, bogus and simplified, like in most homework. That ... (by keskiverto)
by Bopaki
Why am I getting nothing printed by this program
 
When I try to print the program I get nothing Enter a list of integers ending with -999. 12 45 76 89 -999 When I press "enter" to print the lis...
[1 reply] : Do not doublepost. First thread: http://www.cplusplus.com/forum/beginn... (by keskiverto)
by Swag
Data manipulation
 
I was reading this post on the net about Data manipulation and it said “programs produce results by manipulating data(writing, changing and reading)” Could ...
[7 replies] Last: @dutch I think several of us are arriving at that same basic point - t... (by Niccolo)
Reversing numbers on a table
 
I have this code completed, but whenever I run it, the time is backwards. I need it to output 49-10 not 10-49 #include <iostream> #include <fstream> #in...
[3 replies] Last: This is a duplicate post....and, what @lastchance is saying is that th... (by Niccolo)
July 2019 Pages: 1... 67891011
  Archived months: [jun2019] [aug2019]

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