General C++ Programming - January 2015 (Page 16)

Providing Iterators for 2 STL containers within a class
 
Hello, I am trying to improve my knowledge on iterators, I think I have a decent understanding of their functionality as well as their benefits. I had a quest...
[1 reply] : You cannot define two function with same name and signature. This cna... (by MiiNiPaa)
How to disable X-Axis
 
Im a beginner at C++ I would like to know if someone would show be how to disable the X-Axis is a 2D object, such as a PONG paddle
[no replies]
by Gyiove
class problem
 
I have simple class here: class utest { public: utest(); ~utest(); }; utest::utest() { cout << "init" << endl; } utest::~utest() { cout ...
[2 replies] Last: //Create variable a of type utest and initialize it using default... (by MiiNiPaa)
Trimming Char Strings
 
I have created a char string . I know this array will be big enough for its purpose. The problem is that it often too big. When I print this string array I get ...
[2 replies] Last: I did not know that I could terminate with a NULL. I knew once I start... (by retroCheck)
Read char* argv[] to wchar_t then evaluate in a case statement
 
Hello all, I have been working on this quite bit but not getting anywhere. What I want to do is read unicode as argument... for instance from command line. ...
[2 replies] Last: thanks so much! Will test this in the morning!! (by Bdanielz)
[C++, OpenCV] std::set<std::pair<double, cv::Point>> - problem with insert
 
Hi, I'd like to create std::set<std::pair<double, cv::Point>>. My requirements: 1) Sort ordering: first value (lhs.first < rhs.first). 2) Elements are tr...
[4 replies] Last: Thank you very much. I used version with std::tie - it works great! T... (by peter55555)
[C++/SDL2] Adding Bullets
 
I’m trying to add some bullets or something alike to my project. Whenever the player presses the “f”-key, a bullet should be shot. I don’t have a Entit...
[8 replies] Last: @Zereo Yes you did! :)) I've already heard/read something like that,... (by HalfNOoB)
by hanest
why does program crash
 
Hi guys, I had this program running fine then made a few tweaks and now it crashes when k gets to around 10 (depending) on your input. can anyone see what is ...
[7 replies] Last: apologies my computer is just being slow in writing the value to the t... (by hanest)
by jdmic
unique_ptr and nullptr
 
Hi, I'm playing with unique_ptr right now and I'm not sure of the behavior of the code below. The show() method show a browse dialog for a file selection and...
[3 replies] Last: Ok I get it now. I thought the unique_ptr did not exist when I passed... (by jdmic)
Sentence : Hello , FindStringInSentence = ello , EditString = i; Output = Hi
 
Sentence : Hello , FindStringInSentence = ello , EditString = i; Output = Hi please help me this is what i have idk how to continue well we enter string then...
[2 replies] Last: #include <iostream> #include <string> int main() { // enter strin... (by JLBorges)
Converting 1-d array to 2-d matrix ! Reply ASAP.
 
This program is not working. The question and its answer is there below. Please tell what is wrong with this program ? Q.Write a program using user-defined ...
[2 replies] Last: I am using codeblocks. This code force closes after accepting the seri... (by gaurav97)
by Kubani
Problem when creating a window
 
Hi all, In the following link, there are codes of library files including Window.h and Simple_window.h as well. http://www.stroustrup.com/Programming...
[2 replies] Last: Thank you very much. (by Kubani)
fprintf not working
 
I am trying to take text from a file and have it displayed using fprintf at line 46. When I run the below code nothing prints out. My text file has 4 lines with...
[7 replies] Last: I see. Thanks again! (by retroCheck)
cpp function
 
is there any function which can return parameter list of a function. for example : get_param(f(int x,char y )) return parameter x-> int y-> char and f_name -...
[3 replies] Last: No, it is not possible, C++ does not support reflection and wasn't mad... (by MiiNiPaa)
snake game logic
 
//i write program of snake mania game but it has one problem //i have no idea how snake is finish behind head like tail is remain same place //please help me ...
[no replies]
by JChomp
Write cmd via shellExecute, system or createProcess
 
Hi everyone, I need your help. I am working on an optimization process. To do so I‘ve made a program that executes another program (.exe). I can open it wi...
[no replies]
Entering command line arguments
 
I am not sure how to enter command line arguments when I run the executable of the file below. I want check an make sure that only two arguments get into the ma...
[4 replies] Last: Got it. Thanks again. (by retroCheck)
by cmog
Prime Number Code
 
I am fairly new to C++ and I am trying to write a code that determines whether a number which the user inputs is prime or not. I have the code, but when I run i...
[7 replies] Last: Wow thanks for all the feedback guys, I guess I still have a lot of wo... (by cmog)
by anhnha
Return by Reference
 
Hi, Here is the problem: From the page: http://www.programiz.com/cpp-programming/return-reference #include <iostream> using namespace std; int n; int& ...
[8 replies] Last: Value categories are explained here: http://en.cppreference.com/w/cpp/... (by JLBorges)
January 2015 Pages: 1... 1415161718... 24
  Archived months: [dec2014] [feb2015]

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