General C++ Programming - June 2012 (Page 3)

by CMarco
split string
I have created this basic examples: #include <algorithm> #include <boost/algorithm/string.hpp> ...
[12 replies] Last: Hi, I was able to solve my question using str.find and src.substr(f... (by CMarco)
by luza
STL find a pointer in vector question.
Would anyone know which is the 'best practice' to find a pointer in a vector. i have these 3 soluti...
[19 replies] Last: Ok, now I get it :D It works because the vector is a subset of all ... (by TheIdeasMan)
string and parsing
Hi, I have a problem. If I have a string, for example "(3,4)" or "(8,9)", how can I understand that ...
[4 replies] Last: there is a little problem! if s="(8,9" (without close bracket), the sc... (by marcoskivo)
by cniper
array fill problem
what am i doing wrong here?? i am supposed write a program to write a random number in the range (0,...
[6 replies] Last: thank you all. It worked like charm here s the final code #include <... (by cniper)
user defined function and fopen customised file name
Hi, I am trying to simplify my program using user defined function. The function is basically going ...
[1 reply] : you need a string not a char for this: format("1188AC"); ... void form... (by coder777)
Possible memory mismanagement
I have been trying to trouble shoot this error now for a while and I am at a standstill right now. T...
[3 replies] Last: What platform are you running on? There are some heap checking tools ... (by kbw)
problems with SFML
hello i have just started learning to work with the SFML library but it doesn't work yet. i was foll...
[2 replies] Last: found the problem. downloaded some wrong version of SFML... (by gelatine)
by Disch
Concurrent multithreading sync issues
Okay everyone, I have a problem that is KILLING me. I'm reaching out to you guys in hopes that some...
[18 replies] Last: They guarantee that once a variable in one thread is written, other t... (by coder777)
Access other class member function
Hey.. I got in trouble here... I'm trying to do this: fileA.hpp extern class A { public: int...
[1 reply] : in fileA.hpp you declare a gobal variable 'objectA' which must be defi... (by coder777)
by ToniAz
-O3 Flag Disappoints Me
Hello everyone! I've been working on a program whose body contains a quadruple-nested loop. In each...
[7 replies] Last: If you have determined that memory allocation is slowing your down T... (by ne555)
hw problems
1. Write a C++ expression for the following algebraic expression. c = a^3 / (b^2k^4) 2. ...
[1 reply] : [quote=qwert123]1. Write a C++ expression for the following algebraic... (by webJose)
C++ with Google Chrome
I'm fairly new to C++ and was just wondering if it was even possible to write a program that could m...
[4 replies] Last: Thank you guys, ill take a look at these. (by i2Fluffy)
by Hucaru
FFTW - Cannot see where I am going wrong
Hi, I am using the fftw library to perform a Fourier Transform on data that I read from a file and t...
[2 replies] Last: Your data has no oscilation, which means it has a frequency of 0. ... (by htirwin)
preprocessor stuff
Is there a way to detect if a system is using the /proc/ directory at all? I want to avoid detecting...
[5 replies] Last: Thanks, I distribute binaries and source so it is gonna have to be the... (by awsdert)
Size() on static arrays inside a class.
I've been trying to using the command .size() to get the size of the arrays instead of creating a va...
[6 replies] Last: thanks for the help, it is much clearer now. (by forceface)
read string by word by word
Hi im not talking about read word from outside source. let say i declared string string temp =...
[2 replies] Last: plain C++: #include <string> #include <sstream> #include <vector> us... (by Cubbi)
Including an assert into the constructor of a class via if
Greetings everyone. I'm working on some stuff for university right now and I've stumbled over a prob...
[2 replies] Last: Thanks alot, it works. Was as simple as I though. Already had it like ... (by redpaperlantern)
Grading Program and Boolean Variable Confusion!
Okay Im a newbie and Im working on a program that allows the user to enter a grade (0-100) and then ...
[2 replies] Last: Also you can simplify your code for example if (grade >= 90, g... (by vlad from moscow)
by jorgen
Windows.h doing something strange
I have a code (a long one, so I won't include it) which works fine, and then I want to include Windo...
[8 replies] Last: It's not the first time, that happens to me. (by Caligulaminus)
Virtual Inheritance
Lets say I have this code: #include <iostream> using namespace std; class Animal { publ...
[13 replies] Last: Oh, okay! Sorry, I thought you were talking about the code I posted (C... (by BlackSheep)
June 2012 Pages: 12345... 33
  Archived months: [may2012] [jul2012]

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