Beginners - August 2018 (Page 3)

.txt File Location
 
I can't seem to create a .txt file in C:\. NOTE: I have tried many different combinations including C:\, C:\\, C:/, and C://. I don't get any errors when I ...
[8 replies] Last: @tpb No worries :). Thanks for the info by the way, I had never looked... (by H00G0)
Order of Evaluation of successive -> and ()
 
I've come across this code snippet from the chapter on the Composite design pattern from the Gang-of-Four Software Design Patterns book: Currency CompositeEq...
[5 replies] Last: ..and, to make a positive contribution to the thread, another way to l... (by Cubbi)
Random 500,000 numbers and assign to array
 
Hi guys, basically i try to random numbers and assign it to array int array ; cin >> size; for (int i = 0; i < size; i++) { array = rand % 1000000; } ...
[2 replies] Last: The code you've shown doesn't make any sense. int array ; is not legal... (by tpb)
Updating In Real Time
 
So programs pause when they're taking input. How do I split the program into two processes, one that take inputs and the other that keeps working behind its ba...
[3 replies] Last: Technically, async I/O (https://en.wikipedia.org/wiki/Asynchronous_I/O... (by Cubbi)
C++ functions and where to go next in the program
 
hi, having trouble figuring out how to get the comments to go to the comment area of the program, tried an if statement but it just doesn't work for me, any adv...
[1 reply] : the comments are pre-generated ... I think you need to do some logic i... (by jonnin)
by rendy
Bellman-Ford
 
Hi, so I'm playing and currently learning about Bellman-Ford Algorithm and want to how can I make it possible to view which Vertexes the Source went by to reach...
[no replies]
by AL88
I can't overload these 2 functions why?
 
My book is asking me to add two functions to my existing class that return the respective values and its asking me to make them have the same return values and ...
[1 reply] : You are not permitted to create functions that differ ONLY in return t... (by Repeater)
Printing range of numbers and adding intervals
 
I want to print a rang of numbers according to the intervals between them. E.g minimum: 3, maximum: 12 and the interval is 3 should print something like 3,6,9,...
[3 replies] Last: The tutorial http://www.cplusplus.com/doc/tutorial/control/ has sectio... (by keskiverto)
by MrMode
Infinite while loop
 
Hello, need some help with while loop, then enter number in this program everything works fine, but if any other character is entered for example a, i get infin...
[3 replies] Last: If a read operation fails std::cin will be put in an error state which... (by Peter87)
Hello, have problem with class and function calls
 
Hello, I am trying to make a code that reads car model from user and saves in class files and also print out after that. #include "stdafx.h" #include <i...
[4 replies] Last: Hello, Thank you again, Here is my new code #include "stdafx.h" #in... (by redstorm98)
pimpl with template base class...code hiding
 
I am trying to understand this use case. I do understand that one of the objectives of pimpl is to hide the implementation from the users. This means that fo...
[1 reply] : The impl can't be templated. You could try something like this. // ... (by tpb)
by Sergi
Pressing a certain key!
 
Hello, I started to use Code::Blocks, and I am a begginer. I wanted to make a kind of a funny game. But i wanted to check if a certain key (like ,,z,,) is press...
[1 reply] : If you already do key = getch(); Assuming key is a char Can't you u... (by H00G0)
by bufoss
Create a tree to save routes (x,y)
 
Hi all, I am using the following structure in order to save the map, the start postion and the number of columns and rows of a maze struct mazeStruct { c...
[3 replies] Last: It is for educational reasons. ... I want only to print all routes fr... (by dhayden)
Diffie-Hellman algorithm theory question
 
Hi guys I am doing some theory in the Diffie-Hellman algorithm,I don't have to implement it in code just yet,just doing the theory, anyway I get an answer of 1 ...
[1 reply] : Key is 1. You're correct. It doesn't seem secure because you're usin... (by kbw)
I compiled and installed openssl but the program does't compile.
 
I'm trying to make an simple program to recognize smiles and frowns in photos using affectiva's sdk, the documentation states that the sdk works on ubuntu, i am...
[6 replies] Last: i installes a package for debian but the compiler gives the same error... (by gabrielcambe)
Difference creating instances of class using pointer
 
what is the difference and concept between: 1. base* foo1 = new base; 2. base* foo2 = new derived; 3. derived* foo4 = new base; (does not work, but why?) 4. der...
[10 replies] Last: Thank you very much. (by rokij6698)
Searching for Number in txt file
 
I am still bad at C++ , but I am trying to improve ,I saw that ppl were asking this thing alot of times ,but I could not find anywhere something that would help...
[4 replies] Last: Thanks you soo much can I somehow give you +1 or ? @Repeater (by Jovanovic)
by AL88
Why is my static data member and function not counting the objects correctly?
 
Why is my static data member and function not counting the objects correctly? #include<iostream> class myClass { public: myClass(int data):theDataMenb...
[1 reply] : You forgot the parentheses after the function name. std::cout << "T... (by Peter87)
How to handle static variable in class?
 
I want to test the behavior how constructors, assignment operators and destructors get invoked. I tried to use a static variable inside a class, but i get this ...
[3 replies] Last: Just put this between struct Foo and main: int Foo::ctr = 42; // i... (by tpb)
Limiting an input based on the value of another.
 
I'm writing a program to calculate the eccentricity of an ellipse, that's the easy part. My problem is that I have 2 inputs one for "M", and one for "m" however...
[5 replies] Last: This is what has been suggested: #include <iostream> #include <algor... (by JLBorges)
August 2018 Pages: 12345... 15
  Archived months: [jul2018] [sep2018]

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