General C++ Programming - January 2017 (Page 7)

by sona94
Sum of Regional Maxes
 
I should divide a 2D array into square regions with a given parameter(d), find the maxes of each region and then their sum. Can anyone help?
[4 replies] Last: can you help me with a c++ code for this? (by sona94)
Paste once then clear clipboard
 
I'm trying to make a program for password management for myself. I have everything working, but the only way I know how to move the password from the program t...
[no replies]
by lo2
Deallocate strdup in std::map or std::vector (1,2)
 
Hi there, So I have some function that puts a lot of char* into a std::map or std::vector So the function would be something like: someStruct readFile(...
[20 replies] Last: OK, that's interesting to know. Not an area I've ever needed to dabbl... (by MikeyBoy)
Syntax error on calling Base Constructor
 
Hi! I've been trying to create a derived class which calls the constructor of its parent, but I've been getting a syntax error. I've researched everywhere, b...
[5 replies] Last: ../Cipher.h:29:16: error: using declaration cannot refer to a constru... (by gunnerfunner)
by DTM256
Getting "Alt" to work
 
Hey guy, I have a basic Hello World Application I'm writing. As of now I capture single keystrokes with: do {} while(!kbhit()); char keystroke = _getc...
[5 replies] Last: Love the effort, even if it's a bit off. No harm meant by this. Go op... (by DTM256)
Segmentation fault (core dumped)
 
Hi guys, I'm learning algorithms and I made this simple selection sort algorithm. It compiles fine, but when I execute it, I get "Segmentation fault (core dumpe...
[3 replies] Last: > no return statement in function returning non-void which refers to t... (by ne555)
by VTBear
Write a program that reads student names
 
Write a program that reads student names from a file followed by their test scores. The program should then output each student's name followed by the test scor...
[6 replies] Last: I finished it, was able to get assistance. For anyone that needs this ... (by VTBear)
Help needed with Rational class for exercise in PPP2
 
It's as the title says. Especially, right now, I need help with defining addition, subtraction, division and multiplication operators for it, as well as assignm...
[12 replies] Last: Thanks. I'll study that and use it. For now I need to go to bed, tho... (by DragonOsman)
Iterating through vector of class with several elements
 
Hi, I've looked through posts that are similar but struggle to find any that exactly help with my issue. I've created a vector of a type of class with sev...
[3 replies] Last: a function from within the class ... printing with a class member me... (by gunnerfunner)
for and while
 
Hello guys, I'm a complete beginner in C++ programming. I was wondering if someone could PLEASE explain the difference between 'while' and 'for' and how I could...
[11 replies] Last: Try something along these lines - you don't need to use square roots w... (by closed account 48T7M4Gy)
The infinite Loop Problem
 
I'm just testing some ideas for accessing the bytes and bits of an integer. Everything works, the only problem is that I get an infinite loop if I enter a value...
[6 replies] Last: Line 24 will never work since it's out of bounds. You have to check t... (by SamuelAdams)
by Minege
Can't use boost.asio resolver in constructor
 
Hello, I have a class, with attributs that i define line this : private: const std::string m_ip; bool is_connected; boost::asio::io_servi...
[1 reply] : here's the documentation on the constuctor of ip::basic_resolver: htt... (by Cubbi)
constructor value at time of call
 
constructor list supplied at runtime vs before compiler Example below - can I supply building_num{1200}, garages_num{23} at time of the call rather than before ...
[9 replies] Last: ha ha. I found graphics.h, ended up going with SDL library though. Jus... (by technologist)
Please find errors in my program
 
Hello.... I'm trying to make a program to input Course details and display their details as per course semester and year which the user inputs. my program:- ...
[3 replies] Last: I think it was intended as an illustration, to get you started. Here'... (by Chervil)
by zxcvbn
#pragma statements in PIC18F4550 C programming
 
I am new to Microcontroller programming and I thought maybe I should try blinking around 24 LEDs as a self project using PIC18F4550(http://www.kynix.com/uploadf...
[1 reply] : Googling "config BORV" reveals that that snippet is apparently written... (by helios)
coding
 
can someone write a code for this program in c++? write a program that allows the user to enter as many ages of students as needed, and finds the oldest among...
[2 replies] Last: http://www.cplusplus.com/forum/beginner/1/ http://www.catb.org/~esr/fa... (by mbozzi)
Not Getting The Correct Answer
 
http://prntscr.com/dw254o This link is basically my assignment that I'm having trouble with. It's not even a long or complicated source code to write. But I'm n...
[2 replies] Last: Thank you! (by takaflaka)
Please find errors in my program
 
Hi everyone.... I'm trying to make a program to input details of people & display their details as per their mobile numbers which the user inputs my program:-...
[3 replies] Last: Isn't that hard to read? No wonder it's filled with syntax errors: u... (by mbozzi)
GDIPLUS: how can i rotate an image by it's center position?
 
how can i rotate an image by it's center? (i have code from another language and i use flat gdiplus functions, but i can translate from C\C++ to another langua...
[7 replies] Last: it could but the GdipRotateMatrix() Flat function don't accept the 'ce... (by Cambalinho)
Using Structure and Function in Program<< need help
 
i m beginner and i don't know about using structure and function, please help me to solution of this assignment XYZ University needs a system for student’...
[no replies]
January 2017 Pages: 1... 56789... 13
  Archived months: [dec2016] [feb2017]

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