[try Beta version]
Not logged in

Beginners - July 2018 (Page 7)

new and delete vs vector
 
C++ beginner here. I am learning dynamic memory allocation recently and trying to compare with vecto...
Jul 21, 2018 at 11:56am
[2 replies] Last: Thanks Peter! That was a lurking mistake for me :) (by platypus1989)
can you help me in this question
 
,
Jul 21, 2018 at 9:20am
[2 replies] Last: @ipg can you help me with this i think it is Geometric Progression. ... (by closed account 3UohqMoL)
by darkX
Modular multiplicative inverse
 
please suggest me the most opptised algo (preferably in java) to find the Modular multiplicative in...
Jul 21, 2018 at 8:31am
[no replies]
Count++ not adding to initial count
 
Hello, I have spent hours on this project and am hoping for some help. I have been trying to get my ...
Jul 21, 2018 at 4:47am
[1 reply] : #include <iostream> #include <string> #include <fstream> #include <cc... (by JLBorges)
Segmentation fault with empty string
 
I've been in panic recently because I have code that works fine on one computer, but crashes on the...
Jul 21, 2018 at 1:58am
[15 replies] Last: Sometimes when people have been reluctant to post code they can find s... (by dhayden)
by clonxy
How to change a dynamic 2d array from another func
 
I'm trying to create a dynamic 2d array to play chess with only 2 pieces: White King and Black queen...
Jul 20, 2018 at 8:25pm
[10 replies] Last: I agree, doing a manual 2D->1D indexing (y*width + x) is very nice (it... (by Ganado)
Incrementing value of variables in an array
 
Can anyone tell me how I'm supposed to increment in variables that are in arrays? I have tried looki...
Jul 20, 2018 at 6:28pm
[5 replies] Last: Your problem lies in the fact that you are trying to increment the enu... (by Misenna)
Cannot Open Source File
 
In the Main Test File, the statement #include "frac93.hpp" does not work. There is a red squiggly...
Jul 20, 2018 at 5:19pm
[2 replies] Last: The name of the header file is "frac93.hpp". The name "frac93.hpp" is... (by phztfte1)
by ysf007
How to write o good Comparison operator ?
 
hi, I'm trying to check if two objects are equal cause I got this error XD binary '==' : no operat...
Jul 20, 2018 at 4:42pm
[10 replies] Last: If you're looking for efficiency then you might also consider which da... (by dhayden)
The importance of compile time functions?
 
What is the importance of evaluating things at compile time? int x = 10; and constexpr int ...
Jul 20, 2018 at 10:59am
[1 reply] : It allows you to use it in places where a compile time constant is req... (by Peter87)
Difficulty with while loop
 
Hi! I just recently started learning programming and this is my first language and I have no prio...
Jul 20, 2018 at 12:50am
[3 replies] Last: I didn't check your code 100% but it looks really good. easier to jus... (by jonnin)
File I/O Comparing numbers.
 
I have 3 lines in my file. 34532 2323 43242 523 532652 324 4325 5235 235562 If I getline, ea...
Jul 20, 2018 at 12:37am
[3 replies] Last: I'll try to read your code @Ganado. I need to see how I can compare th... (by seungyeon)
Arrays, tables and void functions... help...
 
Can anyone figure out how to read the next value from an input file and store it in array table wh...
Jul 20, 2018 at 12:34am
[1 reply] : void functions can take parameters. void foo(ifstream &ifs) //this i... (by jonnin)
by watted
help with oop exercise (rectangular Matrix)
 
Hello everybody,i need help in exercise: 1.write a class of rectangular matrix in c++ a.define t...
Jul 19, 2018 at 8:44pm
[2 replies] Last: This looks like a lot of fun. Write and you will have fun, too! Br... (by icy1)
by Ch1156
How to create a timer using C++ only and no windows API
 
I am writing a game similar to the Fallout shelter part where they explore the wasteland. I would li...
Jul 19, 2018 at 8:17pm
[12 replies] Last: #include <iostream> #include <vector> #include <string> #include <chr... (by icy1)
C++ Void and cout
 
Hello everyone, Could you please help me to understand why the program doesn't see the input dat...
Jul 19, 2018 at 7:07pm
[8 replies] Last: An example of correct function pass by reference. #include <iostrea... (by Manga)
Implementation of Comparison Operator
 
I am reading Object-Oriented Programming In C++ by Nicolai M. Josuttis. In Chapter 4 of the book, h...
Jul 19, 2018 at 6:15pm
[3 replies] Last: I retyped the test program into another file, and the source file "fra... (by phztfte1)
Google test in CLion - Unit test function using gmock
 
bool bank::read1(int duration){ int num_votes = take_vote(&party, leader, duration); ...
Jul 19, 2018 at 2:37pm
[4 replies] Last: I think in its current state the function isn't testable since it depe... (by Thomas1965)
by SulPC
Code Optimization
 
In what ways could the following code be optimized? It's a basic program state function to all funct...
Jul 19, 2018 at 1:53pm
[2 replies] Last: even with such a small program I would not use the global. optimiza... (by jonnin)
by Donut
Functional Decomp
 
Newbie with another question for the experts...I am teaching myself C++ and have spent a fair amount...
Jul 19, 2018 at 1:14pm
[1 reply] : you can take the file I/O and remove all of it into a function, and ha... (by jonnin)
July 2018 Pages: 1... 56789... 17
  Archived months: [jun2018] [aug2018]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.