General C++ Programming - October 2012 (Page 46)

SDL Issues
 
Hi, I've been working through the lazyfoo tutorials for SDL and have been trying to make something as a small little project. I am trying to modify the Tiling...
[9 replies] Last: You never set screen to point to anything. (by Peter87)
Problem using lambda function with std::for_each
 
Hi! I had tried to use a std::for_each for iterate through list elements. The problem is that I do not get it to work. The code: void GameScreen::Draw(v...
[1 reply] : It looks like that your compiler does not support lambda expressions. (by vlad from moscow)
error object returned from stl::map
 
Hi! I have the next code in which i put an object of class 'testclass' ( child class from 'objeto') in a stl::map. Then I search this in the stl::map and ret...
[3 replies] Last: Thaks for the answers. it works !! (by ShotoReapre)
OpenGL and VBO
 
Hey everyone, I got this code: #include <stdio.h> #include <GL/glew.h> #include <GLUT/glut.h> #include "math_3d.h" #include <stdlib.h> GLuint VBO; static vo...
[1 reply] : Bump (by Angeljruiz)
by blaa15
reading line by line from txt file
 
I am trying to read data from a .txt doc line by line with delimiters. we also have to populate a vector with the info. I have tried everything I know to do, bu...
[9 replies] Last: Do it as you are already doing that is use endl to control the number ... (by vlad from moscow)
by amir22
I am getting an error on this. what Did I miss?
 
#include <iostream> #include <cmath> using namespace std; int main() { double L; double rate; int n; // 2 decimal points cout.setf(ios::fixed); cout.precis...
[4 replies] Last: Thanks very much for your help. (by amir22)
std::is_function fail!
 
Why this fails: #include <iostream> #include <type_traits> template <typename T> void foo(T t) { static_assert( std::is_function<decltype(t)>::va...
[3 replies] Last: Would this work for you: #include <iostream> #include <type_traits> ... (by closed account z05DSL3A)
data file handling output problem
 
i made a txt file & added some text to it when i opened it from a c++ code to display the data, it's printing the whole thing correctly, but the problem is t...
[5 replies] Last: Looping on eof is almost always the wrong thing to do. file >> a; f... (by cire)
string
 
// Includes #include "stdafx.h" #include <iostream> #include <conio.h> #include <vector> #include <algorithm> #include <string> using namespace std; ...
[2 replies] Last: The integer value of a space is ' ' . A char (as denoted by the sing... (by doug4)
by Balrog
OpenGL Windows 7 error (window creation)
 
I've been working on an OpenGL project for several months, and recently ran into a problem after transferring it from Windows XP to Windows 7. Whenever I run th...
[6 replies] Last: If you think you do not have logical errors, run your program on a XP ... (by majidkamali1370)
cross platform software example c++
 
Hello, I am looking to create a small cross platform software using only c++ and i have no clue how to do it. I tried to google it but all i can find is su...
[7 replies] Last: Thanks for all the info everyone. Really really appreciate it. I ha... (by babbarbhangoo)
Heap Corruption in C++
 
Hello Everyone, I have one socket client c++ program it has some heap corruption in that. i m not understanding where this is happening #include <stdio....
[6 replies] Last: Dear Kbw, Thank for your reply. (by Gajananh999)
something wrong with bool true
 
Hi! I want to make my program return to the main menu when the user inputs "1" This is my code #include <iostream> #include <string> #include <ctime> #...
[8 replies] Last: thanks rollie! problem solved! and now I have to solve my infinite loo... (by fahrishb)
by rollie
Boost for non-boost programmers - how to sell it?
 
I'm working at a small software shop, so my manager is open to suggestions for improvement. VC++ 2012 with c++11 support would be nice, but is probably a bit pr...
[3 replies] Last: Thanks for the ICU tip Duoas, appreciated! Looking for specifics to de... (by rollie)
by Tomdub
Help With Converting Digits Or Symbols Into Numbers
 
Hey all, I'm a little confused on the proper method for converting symbols and what not into numbers. For example, writing a program that reads from a fil...
[1 reply] : cin.getline() cin.ignore() http://www.cplusplus.com/reference/string/... (by TheJJJunk)
by LB
int (&main)() = f;
 
int f() { return 0; } int (&main)() = f; It compiles fine, but it crashes. Why does it even compile?
[13 replies] Last: I know! I first thought he was talking about Forward Kinematics, but h... (by Duthomhas)
Array of different classes with member access.
 
Is it possible to make an array of classes while still having access to their members? Say I have 3 classes that all have the same members but the member fun...
[2 replies] Last: Fasinating. I'll have to look more into that but this should work perf... (by Tyler Hummel)
by leoo
Cannot convert wchar_t
 
Hey I had a code problem it, this is the error: error C2664: 'CreateFileA' : cannot convert parameter 1 from 'const wchar_t *' to 'LPCSTR' Types ...
[7 replies] Last: I need to create copypasta out of this or something... WinAPI functio... (by Disch)
Need some help
 
So, I need to use a mergesort to organize the names by alphabetical order and also the height .. I am totally confused, I am having major difficulty with c++...
[no replies]
Xcode on mac
 
Hi All, one question, i am coding c++ on mac's Xcode complier, I can't find the example.txt file that the complier created as following: i thought the file s...
[4 replies] Last: Thanks Grey, Now i know:) (by learntogether)
October 2012 Pages: 1... 4445464748... 50
  Archived months: [sep2012] [nov2012]

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