General C++ Programming - February 2017 (Page 8)

by siery
State/class factory problem
 
Hello! I been trying to some kind structure my game data. In the book "Game Programming Gems" I find a Factory Pattern witch I pretty much understand but I can ...
[2 replies] Last: So BasClass* is a type of the CreateObject function. No. BasClass ... (by AbstractionAnon)
pointer problem
 
Hi everyone , i'm a newbie . I have a problem with my program , i hope you will show me the way how to solve it. Here's my code : #include<iostream> using nam...
[4 replies] Last: > in practice, I don't know of any compiler that does not just assign ... (by JLBorges)
Help please...
 
Hello friends, I'm not good enough on C++.. but I'm trying my best to do what is possible for me. I want you to help me On random words... I want an random wh...
[2 replies] Last: Thank you so much, It's working Great... (by johnsubira)
What next after Stroustrup?
 
Four months ago I was a complete novice in programming. So I started teaching myself C++ using Stroustrup's Programming, Principles and Practice. It's a great...
[5 replies] Last: Broaden your understanding of C++, with what can and what should be do... (by closed account E0p9LyTq)
Who do know single chip microcomputer configuration bits of PIC24FJ256GA108 ? Urgent for it !!!
 
I can not read English manual . Anybody could tell how to set single chip microcomputer configuration bits of PIC24FJ256GA108( http://www.hotenda.com/product-ta...
[1 reply] : You may ask their service department : http://www.hotenda.com/page_in... (by Jackyyi)
by D22
Trying to convert a fraction entered as a string into two seperate int variables
 
I'm trying to create a program that accepts two numbers and turns them in fractions, multiply, divdes, adds, and subtracts them. The user gets to input a frac...
[1 reply] : you can edit this function, if you wish, to overload the extraction op... (by gunnerfunner)
help with an exercise
 
I am sorry that many things are in italian language but i need help. I wanted to create an array where you can insert numbers, then the numbers will appear on t...
[5 replies] Last: C++ is exactly defined by international committee, not by DevC++. The... (by mbozzi)
template parameter F is incompatible with the declaration...
 
Hi, I have this code: template <typename F, typename... Args> struct apply : lambda<F>::type::template apply<Args...> {}; template <template <type...
[1 reply] : Apparently you can't have a template <typename> typename parameter. It... (by helios)
by LongDo
Help - Binary Search
 
// This program demonstrates a Binary Search // PLACE YOUR NAME HERE #include <iostream> using namespace std; int binarySearch(int , int, int); // function...
[2 replies] Last: So, middle is always an integer, but how it affects logic of the progr... (by LongDo)
Tough times detecting the "\n\n"
 
i really wasted so much time trying to figuer out a way whenever the user finish his input he do a double enter which is a new line i tried scanf and cin ...
[3 replies] Last: btw, to answer this part of the question [quote=zeroblank]i figured th... (by Cubbi)
by Hengry
Reading template string
 
My code is suppose read a string and place each section of the string into an array. My code works with <int> , but it does not work with <string> . I'm havin...
[5 replies] Last: array is a pointer to T, but on lines 35 & 48 you are assigning a T.... (by TheIdeasMan)
what is better?
 
in declaration #define 1. in header file (.h) 2. in source file (.cpp) can you help me for have best code?
[1 reply] : If you need the macro definition to be in multiple files, then put it ... (by MikeyBoy)
Has_f<> : checking if a type has a member with a specific name
 
Stroustrup describes a metaprogramming technique to check if a function f() takes an argument x of type X. ie, it checks if the call f(x) is valid or not. ...
[1 reply] : See: http://www.cplusplus.com/forum/general/207113/ (by JLBorges)
by elsa
Stack around the variable "name" was corrupted
 
Never seen this error before in my life. I believe, after some research, it may have to do with array overflow, however, I have used array length MUCH smaller t...
[3 replies] Last: damn...i can't believe i didn't see that. thanks so much guys. (by elsa)
Programming Project Help
 
This is a basic end of course assignment and me and my team are at a loss we have pulled together this program and debugged, but we are still not getting exactl...
[4 replies] Last: Further I would concur the 7 vector parallels is an issue, this seems ... (by SecretSquirrelNutz)
declaration syntax
 
What does this declaration mean in a struct? uint64_t tpid : 12;
[1 reply] : It is part of what's called a bitfield. Basically, it means that the i... (by lordseanington)
having problem using QVariant as a value in my container class
 
i am an amateur in Qt. i started recently. i have read other topic relating to mine in the forum but they all seem close to but not it. so i decided to post my ...
[1 reply] : /* this is where i tried to display my widgets on screen but failed. ... (by cire)
Setting random obstacles?
 
Hi there everyone. I'm really struggling currently with getting this grid set up for a very basic game I'm trying to create. My task is to make the user input t...
[1 reply] : you can roll a random number for each cell in the thing and make a cho... (by jonnin)
windows form, 2 issues. getline no instance of overloaded function
 
as the title says, im using ifstream to read from a file(its a single line of text). then im using getline to store it and print it out, however i cant seem to ...
[3 replies] Last: //Solved. had something related to what type of string it was and cau... (by gokitty)
Using reference before function name
 
Can someone explain what this does: const string &foo() const { return element; } I understand why we use references before variable names, or in par...
[4 replies] Last: It's just for performance reasons. If you don't return a reference the... (by Peter87)
February 2017 Pages: 1... 678910... 16
  Archived months: [jan2017] [mar2017]

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