General C++ Programming - January 2014 (Page 23)

by Juicej
Soil image loader
 
can someone tell me the best way they used to load an image using soil library.. i've been trying so long now.. can show me an implementation that worked for th...
[1 reply] : im using a white object to put texture over.. jus saying (by Juicej)
C++ design patterns of old. Do they still apply
 
I have the book, Design Patterns, Elements of Reusable Object-Oriented Software. It was written back in 1995. I know that the C++ language has gone through cha...
[7 replies] Last: You shouldn't have to worry. The most used patterns come for C++03, C... (by S G H)
by Zyl
Crash when iterating std::map
 
Hello. I am iterating an std::map and get a crash between end of one and start of the next iteration. It always occurs on the same iteration, but only given...
[3 replies] Last: I changed an std::list to std::vector which fixed that problem. (for w... (by Zyl)
by Kauto
C++: Error C2664 and Diagonal Sorting
 
Hello, this is my homework: Create 3 functions, 1 that would create a 2D array and fill it randomly, then the 2nd function to print the Array on the screen, and...
[1 reply] : #include "stdafx.h" #include <iostream> #include <math.h> #include <t... (by Yanson)
C++ error
 
I'm trying to make a program in which you run the program in command prompt, and you type a message that is saved in a file. That file's dir is typed in the arg...
[1 reply] : argv is a char**, so string dir(argv); makes no sense. It should be ... (by toum)
by ntran
Reading matrices from text file
 
Hi everyone, I would like to program a simple finite element solver in c++ (I'm a relatively new programmer by the way). This is the issue, I have a text file ...
[1 reply] : You could use vectors of vectors. (by toum)
by kkirk
Large 2 dimensional arrays
 
Does anyone know a way to create a very large 2 dimensional array. I am talking in the order of : int sl ; I am new to C++. Also is there a better way th...
[3 replies] Last: Thank you JLBorges & Caligulaminus I add a static keyword before the ... (by kkirk)
SMTP Email
 
Hello, I want to send an email using Google's SMTP server. How do I achieve it? I'm a beginner so yea, I'd appreciate any details.
[2 replies] Last: I occasionally work on an article I want eventually finish regarding t... (by Computergeek01)
by huike
Pointer help
 
I'm having a problem understanding something with pointers. I was trying to pass a pointer into a function in MSVC-2013, like char* charptr; and then callin...
[1 reply] : Pointers are just like normal variables. Like an int . All the rule... (by Disch)
Setting a time limit for a level in 2D game
 
So I am have made this 2D ball game. But I want to set a time limit for each level. I want player to play that level for maximum 3 minutes . After 3 minutes ...
[2 replies] Last: Games typically have a main logic loop: while( game_is_running ) { ... (by Disch)
Declare Array n function challenge
 
Can some help with this Challenge. There are x number of sections in a course. In each section y number of quizzes are conducted. The average for each quiz ...
[no replies]
Need some to gve me a solution code to this: commander interpreter
 
Write a special simple command interpreter that takes command(s) and its(their) arguments. This special command interpreter will only have three different cases...
[2 replies] Last: Pls I ask for hints as a beginner in C++. Thanks keskiverto (by jokatech)
My own functions
 
JLBorges' random_if_else_if has inspired me to write out my own functions and share them here. I'm sure none of these will be original ideas, but I could not f...
[6 replies] Last: > Why doesn't svout (std::endl) work? std::endl is: template< type... (by JLBorges)
Read files in a folder
 
I am using dir object from dirent.h to read files of a folder. The code I am using in order to read all data is the following: vector<string> directories; ...
[1 reply] : The order is not defined. However, as it happens, file systems tend t... (by kbw)
Random Number Generation in a Loop
 
So, I've researched this quite a bit and the overwhelming answer I've been seeing for a loop generating the same pseudo-random number is that you're seeing the ...
[2 replies] Last: Omg, I'm so stupid. That makes sense. Totally fixed the issue. (by Aaron Vienneau)
by Cpper
ShowWindow not working
 
#include<iostream> #include "windows.h" using namespace std; int main(){ HWND Win = CreateWindow(NULL,"Test",WS_BORDER|WS_VISIBLE,300,400,800,600,...
[2 replies] Last: WOW :) You are confused, Mr.Cpper. Programming in Console mode is dif... (by Kamose)
How to save a callback function with it's paramater and call it later
 
Hi everyone. I have a problem with my project. I have a function (name Callback), with take some parameter( name Arg). I want to create it before, pass it to...
[7 replies] Last: @cire +1 @Dinh Hung: If you are not certain that every character in t... (by JLBorges)
trouble : convert string to double
 
i have problem when i had convert string to double variable #include<iostream> #include<fstream> #include<string.h> #include<sstream> #include<vector> usin...
[no replies]
by muhsid
Genetic programming
 
Can anyone help to make this code run ,it is working upto create_binary and fitness. i need to link the chrom::selection with other ie i need to select a binar...
[no replies]
Efficeincy Question
 
If there is a function that renders an object, these objects are medium sized in terms of memory and process time, the first rendered object is in the backgroun...
[1 reply] : Generally the difference is negligible, though depending on your imple... (by Albatross)
January 2014 Pages: 1... 2122232425
  Archived months: [dec2013] [feb2014]

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