General C++ Programming - August 2016 (Page 5)

visual studio header file
 
I read vs head file found something, who can illustrate them with simple language, I do not understand their funtion. #pragma pack(push,_CRT_PACKING) #pr...
[1 reply] : 1. Save the current packing behavior on a stack and set it to _CRT_PAC... (by helios)
boost graph library: usage of undirected_graph
 
Hi there. Have next declarations: #include <string> #include <boost/graph/adjacency_list.hpp> //#include <boost/graph/undirected_graph.hpp> #include...
[no replies]
Program terminates after inputting vector elements
 
Hi everyone, I hope you can forgivably help me answer this kinda noob question. I was coding Ex 8 Chap 5 of Stroustrup's C++ Principles book. Long story short,...
[9 replies] Last: #include <vector> #include <iostream> using namespace std; int main... (by closed account 48T7M4Gy)
How do I create a template function to print based on container passed to it?
 
It'd be very useful if I could create a generic print function that takes a STL container object (queue, deque, vector, stack, map, etc...) and prints it a cert...
[3 replies] Last: Improved version: handles nested sequences and ADL-selected overloads ... (by JLBorges)
by mvgnum
Pointer to Pointer program
 
Hello guys, I found this exercise online and i need to do it for my class. I have NO CLUE. Please help CS M10B - Topic A Project – Due Tuesday 9/8 Write...
[2 replies] Last: I'm sorry to say that this is a really horrible assignment. It's so ba... (by dhayden)
Linking problem (undefined reference)
 
Hi my friends. I hope somebody can help me. I have included in my project (written in C++11) some files from a another author, which are written in C. I use Q...
[2 replies] Last: My god !! Thanks you. You have resolved my problem in one second ! I d... (by danjiun)
OpenGL and Multithreading
 
Hi! I'll try to be short. I'm making my OpenGL application multithreaded, because I want to load resources (models, textures, shaders and fonts) asynchronously...
[6 replies] Last: Actually, since you mentioned tutorials, here's a good one: https://vu... (by JayhawkZombie)
by a10e29
SDL_RenderCopy Memory Leak?
 
Hi, void SDLToolBox::render(Coordinate myCoord, SDL_Rect* myRect, SDL_Texture* myTexture, bool flip) { renderQ = { (myCoord.xCoord - camera->getViewPortX()...
[1 reply] : http://forums.libsdl.org/ (by helios)
Can i do this to remove allocations
 
is this valid/stable method of passing pointers, may be a silly question but i need the memory on some recursive functions. This seems to work fine on all my ...
[7 replies] Last: thanks (by KingCow)
Trigonometry Functions in C++
 
Is C++ in radians or degrees mode by default, and if in radians, how do i convert it into degrees?
[2 replies] Last: Trigonometric functions are in radians. 1 radian = 180/π degrees. ... (by integralfx)
Printing a double without a decimal point?
 
I want to print out the result of my output without a decimal. Essentially, like an int. I was looking into bit shifting, but ran into a dead end. It seems so ...
[15 replies] Last: Cire I'm using your version of this. It's excellent. I also want it to... (by Anchises68)
by mark90
Q-Learning Example isn't running
 
Hello everyone,I have this q-learning example taken from the following website :http://mnemstudio.org/path-finding-q-learning-example-1.htm. The problem is when...
[5 replies] Last: cire, thank you . Yes, my console window closed before I see any outp... (by mark90)
by bozmin
Using Pointers or variables
 
Hey, I am a beginner user of c++. and I have a question concerning pointers. Is there any deference for using regular variables, while programming, or poin...
[4 replies] Last: Between those two examples you just posted, ex1 is much better. I act... (by kevinkjt2000)
What is the best structure to store matrices for Finite Differences Methods?
 
Hi, I implemented the so-called Finite Differences Methods which consist on computing a value of a matrix recursevely. The issue I am having is a stack overflo...
[12 replies] Last: Thanks, Cire, that's certainly something to consider in the final mix. (by closed account 48T7M4Gy)
by ZimCa
How to search faster in c++?
 
Here is my code : #include <iostream> #include <windows.h> using namespace std; int main() { for(int n = 0;n <= 500000;n+=4) // from 0 to 500000 4 bytes ...
[6 replies] Last: system() runs a separate program. It has to find the program, allocate... (by dhayden)
practice finding/correcting errors
 
I am trying to practice finding and correcting errors. I have a decent knowledge about C++ but not enough of course, which is why I am practicing. - the end ...
[4 replies] Last: i didn't think it was that picky with line 1, Compilers are nothin... (by doug4)
help me understand this piece of code
 
so i have this working piece of code that finds the max and min of an array and respectively assigns it to max and min variables i need help understanding it,...
[5 replies] Last: You shouldn't need to use 'else if'. Just have two 'if' statements. ... (by dhayden)
convert wchar_t* to LPSTR {aka char*}
 
Hello, wchar_t buffer ; //wchar_t buffer = {0}; GetModuleBaseName(hProcess, 0, buffer, 50); The compile error I get is :- ...
[4 replies] Last: if your prefer to write your own conversions rather than using librari... (by KingCow)
C++ Program Help.
 
I need help understanding the C++ code instructions. TempConvert(); In this challenge you will create a C# method that translates a temperature. Your co...
[2 replies] Last: As TheSmallGuy said, we do not make your homework, either you post a c... (by closed account 1vD3vCM9)
Creating a Program in C++.
 
I need help understanding this instructions for the following C++ program. Main(); “Menu” In this assignment you will modify the main method, adding a ...
[1 reply] : You should have just put all 3 of them in the same post, since they al... (by JayhawkZombie)
August 2016 Pages: 1... 34567... 12
  Archived months: [jul2016] [sep2016]

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