General C++ Programming - March 2016 (Page 8)

OpenGL: DepthTest at FBO
 
Hi There, i need some help with OpenGL offscreen-rendering. I have a simple test-program, rendering a textured cube to a textture, which is used for a cube aga...
[3 replies] Last: No worries, glad you got it sorted. With regards to the libraries, yo... (by MrHutch)
merging programs
 
hi ! I have two programs prog1 and prog2 , there are features in prog1 I want to use in prog2 , whats the best way of doing this ? if you look at the code the m...
[1 reply] : whats the best way of doing this ? It depends on your needs. A good w... (by coder777)
can't differentiate between Bool and int when overloading function
 
I read something like this "can't differentiate between Bool and int when overloading function" can anyone tell me this with an example ?
[4 replies] Last: @peter87, Thanks (by rajhansk)
Squelettisation image
 
Bonjour j'ai besoin d'un programme en c++ sous visual studio qui permet de réaliser la squelettisation d'une image pour ensuite la sauvegarder. J'espère que ...
[2 replies] Last: Bonjour, je pense que pour la squelettisation des images, il te faut u... (by chae)
by blahhh
if statement help???
 
I am making a game in C++ and I have an option so they can exit the game on the main menu. I am very new to C++ and I cant get this if statement to work proper...
[1 reply] : = and == are two different things. (by Moschops)
Help with code
 
Hello Everyone, program in total adds the number of calories multiplied by number of donuts which is wrong, I'm trying to make it display the total number of ...
[1 reply] : total.quantity=quantity*D.quantity; // Why are you multiplying? tot... (by AbstractionAnon)
Exponentials
 
I'm aware of how to do incremental patterns and there's lots of tutorials on that already, but this multiple-like function I cannot figure out. Would apprecia...
[6 replies] Last: @DragonflyBeach So the back function returns the print to for (int r... (by DragonflyBeach)
C++ Written Homework
 
I received a homework assignment that asked the following: Write a program called country.cpp to read a text file that contains the names and sizes of countr...
[6 replies] Last: Please use code tags when posting code. Highlight the code and click t... (by dhayden)
by red101
check balanced parentheses
 
Hi! I am trying to figure out how to check if the parentheses in a file have matches. However if it is inside double quotes and // comment slash it is not count...
[7 replies] Last: I would do it like that: #include <iostream> #include <string> #incl... (by Thomas1965)
the problem with multi inherited struct's memory-layout on linux
 
At the beginning, my problem is here: http://www.cplusplus.com/forum/general/187028/ But now, I found something newly; (And like preview problem, I will t...
[2 replies] Last: What make this result? Perhaps a more important question: Why are ... (by TheIdeasMan)
the difference memory size of struct between linux and windows
 
I code a struct on window and linux, but i got the different sizeof() and memory address, could any one tell the reason? code: #include "stdio.h" stru...
[3 replies] Last: I found something newly, and create a new topic: http://www.cplusplus... (by ZiMuFeng)
Need some help with looping
 
I'm trying to get the user to input scores from 0 to 100 and then find the maximum and minimum and average of the scores. I know I have to loop, but I'm not ...
[1 reply] : Hi, one approach is that you store all the values entered by the user... (by Mathes)
help with making lines of a file its own array
 
This what i have so far im not sure exactly how to make the getline send the line to the array . i dont want to display the array just be able to search the ar...
[3 replies] Last: while (!myfile.eof()) { getline(myfile, line); string s... (by Moschops)
Stroustrup's PPP2 std_lib_facilities.h corresponding .cpp file help needed
 
As the title says, I need help creating a corresponding .cpp file to go with the library access header for Stroustrup's PPP2 book, std_lib_facilities.h. The de...
[4 replies] Last: Alright, got it. Thanks for the replies, guys. (by DragonOsman)
Clarification about dynamic allocation of a pointer-to-pointer
 
Hello. I've this code: int** matrix = new int* ; *matrix = new int ; matrix = 4; I don't understand this very well. Matrix is a pointer to an array ...
[7 replies] Last: Instantiating a Matrix object does not ensure that member functions wh... (by cire)
OpenMP: ideal way to use a shared vector
 
I need to write a prime number generator function with multi-thread. Here is my code below: #include <stdio.h> #include<array> #include<vector> #include <om...
[no replies]
by nz881
Counting the number of words from a text file in C++.
 
Hi there, I am trying to write a simple program where the number of words are counted from a text file.The program below reads the file correctly and then displ...
[5 replies] Last: @S G H thank you so much. What you said about getline was the main rea... (by nz881)
wxWidgets event propagation
 
I'd like to set some hotkeys for my program that can be raised no matter what object has focus within a wxPanel. Unfortunately, when I connect the event to the...
[3 replies] Last: I'm facing a new problem now. I am switching panels in a wxSimplebook... (by IWishIKnew)
Casting int to char: need reference
 
I'm using Bjarne Stroustrup's "Programming: Priciples and Practice Using C++" and have run into a problem in the Drill Exercise for Chapter 4. Step 1 has the r...
[2 replies] Last: cire, Thank you very much for that information. I couldn't find anyth... (by jeffbiss1)
Need help with a programming contest exercise
 
Hi everybody, I signed up for a contest, and I'm practicing, but now i'm a little blocked with this. The Problem: There is a game with an N*N matrix, ever...
[4 replies] Last: You can avoid deleting the neighbors' neighbors by changing lines 15-2... (by dhayden)
March 2016 Pages: 1... 678910... 23
  Archived months: [feb2016] [apr2016]

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