General C++ Programming - December 2014 (Page 3)

why :: before iterator class?
 
I am unable to understand it clearly. std::list<int>::iterator it = mylist.begin(); specially ::iterator. list in std namespace so use ::. bu...
[4 replies] Last: thx, I start to read stl. it help me to understand. (by sujitnag)
Input/output strings/files
 
So I want to build this app and don't want to get into the mess of SQL, so I thought that txt files are gonna be more then sufficient for me... but I am at a de...
[1 reply] : NP, ask if there is anything else you need ;) (by MiiNiPaa)
by nthuth
Class design question related to video game
 
I'm working on a game and wanted to modify the behavior of a bullet when it hits an object. The bullet class inherits the GameObject class and my game engine i...
[1 reply] : you should almost never have logic in your code that asks an object w... (by MiiNiPaa)
One-dimensional array output problem
 
i look out this site for solution for this question : One-dimensional array output problem This is a class assignment from the book "C++ How to Program 8/E" b...
[3 replies] Last: salam, codeto ba gcc compile kardam moshkeli nadasht. (by Nezar)
by Nezar
std::remove
 
Hey, Apparently, the way std::remove( in <algorithm> ) works is that it pushed the unwanted elements to the front and changes the end() iterator position. I...
[5 replies] Last: Thanks guys, every one of your answers taught me something new. (by Nezar)
3D graphics, Game design
 
I'm intending to make a 3D paper plane game, for a change. I need some recommendations for modeling software, I'll make a small paper plane and some simple o...
[1 reply] : For modelling I would use Blender3D, it's free too. For writing the r... (by Callum5042)
std::pomise / std::future, uninteligible linker errors.
 
I've been trying to figure out how to get a return value back from a thread, and found all kinds of info on promises, futures, packaged_somethings, async, .... ...
[1 reply] : The code posted is not the code compiled ("#include fuiture>" won't pa... (by Cubbi)
by ramye
Runge Kutta
 
hello, I'm looking for someone to help me with this code.. i'm trying to resolve a second order equation.. (dv/dt)= 10 - (94.5/0.3)x - (13/0.3)v; (dx/dt)=v;...
[1 reply] : http://stackoverflow.com/questions/12662891/c-passing-member-function-... (by ats15)
my code is going out of bounds
 
I am really unsure how to keep within the boundries and still perform the function I need. My code functions normal when I have both categories 'buy' and 'sell...
[2 replies] Last: In void buymngr(), at line 17, you have int y = 3; y+=7; . You could... (by ats15)
Compiling problem
 
Hey guys, so I have DEV C++ version 5.7.1 on a windows 8 laptop. Im getting a problem whenever I click on the DEV C++ shortcut that looks like this: The foll...
[2 replies] Last: Pretty sure that dev c++ has a forum, if nobody is going to answer. (by poteto)
Number of permutations
 
Please help me to solve this: We are considering a word C containing only lowercase. An anagram of the word C is a word formed by the letters of C in anot...
[7 replies] Last: Thank you! (by adina0822)
by pope
Class,set and get functions in object oriented programming using C++
 
Pls,help me solve this question: create a class called Employee that includes 3 pieces of information as data members,a firstname(type string),a lastname(type s...
[1 reply] : So, you're asking people to do your homework for you? Yeah, good luck... (by KarenRei)
Member variable aliasing a function?
 
So, one can do stuff like this using #defines: #include <iostream> #include <array> #define x arr #define y arr #define z arr class Point { public: Poi...
[4 replies] Last: "What's so difficult about x.sum(y) instead of x += y? " Are you sure... (by KarenRei)
Combinations
 
Please help me to solve this: There are n students who can be good in d domains. Determine the groups of k students that will cover all the d domains. Th...
[no replies]
Issues with virtual inheritance and static data
 
Consider the code below: #include <iostream> #include <string> struct Thing { std::string name, codeName; int width, length, height, mass; Thing() = de...
[1 reply] : Solved! #include <iostream> #include <string> struct Thing { stru... (by prestokeys)
Letters to Numbers
 
Okay, so I have a science fair project and I decided on doing a series of programs that show the simpleness behind hacking a password. Each program increases in...
[19 replies] Last: ok thx m8 (by xHyperionx)
putting a variable in a function and getting a return value
 
I want to get a random number from this function but idk if I did this function right can you please take a look int random(int x) { srand(static_cast<u...
[5 replies] Last: Since you're using c++, you should really consider std::random (that i... (by KarenRei)
VGA Attribute Enable Blink in graphics modes?
 
What happens when the VGA Attribute Controller Mode Control's Blink Enable bit is set during graphics modes? Will blinking be applied (color/black) at all? What...
[no replies]
<Windows.h> SendMessage Help
 
SendMessage(hWnd, WM_SETTEXT, NULL, (LPARAM)L"xyz"); hello how does it look like i mean send message parameters when i want to sent something that is stored ...
[5 replies] Last: SW_MINIMIZE is intended to be used on already existing windows. Use SW... (by MiiNiPaa)
Run time error C strings
 
replaceSubstring Function Write a function named replaceSubstring. The function should accept three C-string or string object arguments. Let's call them string...
[1 reply] : Line 28: it checks if strPtr is null and sets loop_exit to true. Loo... (by MiiNiPaa)
December 2014 Pages: 12345... 31
  Archived months: [nov2014] [jan2015]

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