General C++ Programming - July 2013 (Page 14)

by sumsar
Problem with OpenGl
 
I just started learning OpenGL and I have a bug with my first project. I know I installed Freeglut right because I can run some other code that includes freegl...
[6 replies] Last: Okay thanks I found out that my settings was on C for some reason :/ b... (by sumsar)
Code Blocks Doesn't Work Anymore! (1,2)
 
For about 3 months Code Blocks worked fine and then one day I went on and it said: "This application has requested the Runtime to terminate it in an unusual way...
[23 replies] Last: Sorry but it actually doesn't work. I can open it now but my programs ... (by megasnorlax)
Dosbox video mode 13h on real VGA?
 
Shouldn't Dosbox's video mode 13h, on a real VGA, have this in the settings of Video mode 13h? { 0x013 ,M_VGA ,320 ,200 ,40 ,25 ,8 ,8 ,1 ,0xA0000 ,0x2000...
[no replies]
All task orderings
 
Hey all, I am stuck and in need of an algorithm that will solve this problem: Given N tasks (numbered 1-N) and a series of task restrictions (do task 3 befor...
[9 replies] Last: Thanks you, I am going to have to translate the out-dated code, but it... (by Script Coder)
Skilled eye needed for Snake game!
 
Hello. I'm in the process of writing a console version of the classic Snake game and I need a little help. The scenario: Currently, I have a board (represe...
[7 replies] Last: I understand now. I was able to fix the bug after reading through ever... (by Nathan Justice)
Need help!!
 
My program seems to work just fine except for one small thing. If I enter numbers other than what makes the condition right, it still displays "Inventory code" ...
[1 reply] : To begin, this really should be upgraded to switch statements, and the... (by meesa)
to use if or not to
 
i was just playing around with the idea of not using if statement and decided to do a program which outputs the number of factors a number has "10 has four fa...
[1 reply] : The latter is faster because it uses 5 less arithmetic operations than... (by Thumper)
template functions
 
Write a function template declaration for a function with the following characteristics: • The function name is “Tester3”; • The function return typ...
[3 replies] Last: that is not a declaration , but a definition (by ne555)
How to use function with pointer parameter to print an array??
 
The printArray function should take in the dynamically created array and the size of the array as parameters. It should print out the contents of the array. ...
[2 replies] Last: #include <iostream> using namespace std; void printArray ( const in... (by vlad from moscow)
by Daleth
Static variable inside a member function
 
Say you had: class Foo{ public: //... void funky(); //... private: //... }; void Foo::funky(){ static int counter(0); //... }; ...
[3 replies] Last: Nah, your wording was fine. I was just trying to illustrate why it wo... (by Disch)
Pointers
 
Can anybody show me how to use pointers in this function of my code? void Name::ReverseUsingPtrs(char *Reversed) { string temp_array = TheName; ...
[1 reply] : Your code assumes the string passed in has at least one space. It's n... (by kbw)
Pointer in the right direction
 
Could I get a vague pseudo code if the field of 2d (side-scrolling) chunk loading? I just need to figure out how and when to load chunks, I understand the conc...
[3 replies] Last: Sorry for the vague question, It would be tile based, As for parallax... (by Pickle Gunner)
by Simula
[Problem] Sudoku
 
Hello forum I have been stuck on creating a c++ project that creates a complete sudoku from blank. I work with an array with 81 indexes, it starts in the upper...
[1 reply] : I compiled your code. I paid attention to the warnings the compiler g... (by cire)
What does "->" do?
 
So lately, I've bumped into codes which have used the "->" statement/operator a lot. Can anyone tell me what does that do? (I can't google it since google ignor...
[3 replies] Last: pointer to an object that is Untrue. Whether or not pointer p p... (by cire)
displaying the contents of a map
 
I'm trying to display the contents of this map. I'm having some trouble where the program ceasing to display after "Index Contents."(lines 33 -40) If I move th...
[1 reply] : Ok, so I just realized I have a scope problem. oops... If anyone has a... (by Chris Meyer)
by maniac
Programmers tasks
 
Hello guys! I'm new to this forum but I have been learning C++ for a long time. I know how to implement linked lists, binary trees, stacks and things like this....
[13 replies] Last: @maniac some examples were from a C job. I use C++ for the most part. ... (by Cubbi)
Error with the code
 
Hello everyone, I am a newbie to C++ and probably have made a few mistakes with the code. I am creating my own function. And the code seems to work fine when I ...
[no replies]
VGA Graphics emulation?
 
I'm currently working on VGA Graphics emulation (the rendering part. Text emulation already works). For some reason I keep getting blue pixels everywhere, when ...
[1 reply] : Got it working so far on the 256 color shift mode and the Monochrome m... (by superfury)
by Foxar
Making sf::Sprite a member of a class.
 
Hello, i'm trying to make a very simple game in SFML, and i have a problem. Whenever i try to create sf::Sprite for the class where all properties of Player (hi...
[2 replies] Last: I can't believe, i were struggling along with a buddy on this long tim... (by Foxar)
by bob87
typedef as data type for specialized template function in class from shared library
 
Hi, I have a class "Result" with a single template function Set(const std::string& arName, T& val) and a specialization of this function Set<Real>(const std:...
[3 replies] Last: I'm pretty new to templates too. But here is what I found: http://stac... (by Daleth)
July 2013 Pages: 1... 1213141516... 34
  Archived months: [jun2013] [aug2013]

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