General C++ Programming - May 2016 (Page 9)

by Heytsu
Convert Python program to c++
 
Hello, can someone convert me this python script to c++ script please ? There it's the script, thank you ^^ from math import* import math g = ...
[3 replies] Last: then you have to do it manually: http://www.unco.edu/nhs/mathsci/Clas... (by closed account 48bpfSEw)
the latest gcc "volatile" keyword(I can not understand)
 
The C++ standard differs from the C standard in its treatment of volatile objects. It fails to specify what constitutes a volatile access, except to say that C+...
[4 replies] Last: Interesting it's being brought up; the C++ committee was just discussi... (by Cubbi)
qt automoc error
 
I have a simple c++ qt program. I get error when I use private slot. Can anyone tell me how to solve this? I am using Qt5.6, cmake on windows with mingw comp...
[1 reply] : That is the header. Where is the implementation? (by keskiverto)
recursive hanoi tower code with condition that we cant move disk from peg 1 to 3
 
so we have to change this recursive hanoit tower code and add this condition to it : we cant move any disk from peg 0 to peg 2 directly also we can't move any ...
[5 replies] Last: THANKS!!!!!!!! (by omidelf)
How do I capture and Process each and every frame of an image using CImg library ?
 
Hi, I'm working on a project based on real time image processing using CImg Library in Raspberrypi. I need to capture images at higher frame rates (say atleast...
[6 replies] Last: Though using a camera is a valid approach, in effect you just want to ... (by Chervil)
Class not declared in scope
 
Background : I have creating a serial port based data acquisition project using Win32API and C++. I am going to request data from my embedded device using ser...
[3 replies] Last: The build was succeeded when done on command line. I deleted the proje... (by Dark Sorrow)
Data Type Exception Handling
 
I am writing a program that requires the use of exception handling for user input. The user is required to enter a positive integer. I accounted for the excepti...
[1 reply] : Hi Dhaneku, I'm not sure that cin throws an exception on bad input,... (by Aaron Vienneau)
I know this is wrong, but I want to know why it works
 
So, this code sample creates an automatic variable and pushes it to a vector repeatedly. As this image shows, the same memory address is being pushed to the vec...
[4 replies] Last: Yeah, I think I had a brain fart there, but also a misunderstanding of... (by Aaron Vienneau)
Need some guidance with a c++ constructor
 
I have a class Student with name,surname and id number and class Teacher with name, surname and suject. I have to make class School which contains an array of S...
[2 replies] Last: Hello shad0wblaz3, I think I'd be remiss if I didn't mention some not... (by Aaron Vienneau)
In need of some help
 
Thanks for help!
[7 replies] Last: Start a new topic (Forum - General C++ Programming, click on the 'New ... (by JLBorges)
Program crashing at run-time in visual studios
 
Hello, This is for an assignment and I am completely lost. The program compiles in visual studio professional 2015 then when I use the the = operator in Ma...
[3 replies] Last: Particularly while learning C++, if only one compiler is being used, s... (by JLBorges)
object defining within another class?
 
How would i go about getting the Person person_data in the private section of the second class; Assume i have all the other member functions what bit of code or...
[2 replies] Last: #include <iostream> #include <string> class person { public: ... (by JLBorges)
Class objects
 
In class PEmployee class private section. I need to define person_data which is from the person class. I am not sure how calling the constructor works in this t...
[2 replies] Last: [quote=SIK]I am not suppose to change anything.I have to make it work ... (by Andrewcen16)
by brad97
Problems Using Static Library
 
I am attempting to write the code for a console application that uses a static library in another project. In this code I am getting many errors pertaining to i...
[10 replies] Last: Yes, i forgot to add the show function in the for loop to print the da... (by brad97)
Insertion sorting & Deleting nodes in singly linked list
 
So the whole concept is to sort a singly linked list using insertion sort and deleting the nodes in order. The other codes are given, so all I have to do is fil...
[1 reply] : > But mine would be like: funny, your code doesn't compile. void I... (by ne555)
Please help
 
Hello, I have this simple code: #include <iostream> #include <Windows.h> using namespace std; int main() { float x, y; cout << "Enter x coordinate...
[2 replies] Last: You have not adjusted for coordinate systems.    - The console ... (by Duthomhas)
No duplicate numbers in 2d array
 
Hello everyone. So i'm trying to do a bingo game. I use a function to randomize my numbers inside my array and the number is between the range of the array size...
[4 replies] Last: @hwan97 Here's how you can make each number unique in a 2D array, but... (by whitenite1)
how to dynamic declare a struct?
 
Thing is I want to create a struct object according to the content of the file named `config.ini` , *for example :* if the content is : > int a; int b; then t...
[1 reply] : struct test { #include "config.ini" }; (by Peter87)
When do we use reinterpret_cast?
 
I don't understand why I can't wrap my head around this particular type of casting... I know why and when we use static_cast, I know why and when we use const_c...
[1 reply] : reinterpret_cast can be used to convert one pointer type into another ... (by Peter87)
what is this type of vector mean?
 
1. vector<int> path(1, 0); this looks weird. how to use this vector? vector<bool> path(true,n)
[1 reply] : vector<int> path(1, 0); creates a vector of integers which is initia... (by Peter87)
May 2016 Pages: 1... 7891011... 17
  Archived months: [apr2016] [jun2016]

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