General C++ Programming - June 2011 (Page 21)

pointer to pointer errors
 
I am writing a piece of code which stores a large number of unsigned integers (about 250 Million of them), so I used something like: unsigned int *locations...
[2 replies] Last: You are correct. It was a bounds error. Both the second way and the ... (by pzratnog)
by ramako
help with fstream write function.
 
Hi, I am having trouble as to understanding how the write function works. Here is my code: ofstream fo(file, ios::out | ios::binary); fo....
[2 replies] Last: Yeah, it works now! Thanks! Does it copy ALL the vector or just t... (by ramako)
friend function, unresolved external symbol
 
I got 2 classes Point and Rect, all in one header: template<typename T> class Point { private: T x; T y; public: ...//ctor's & standard opera...
[6 replies] Last: Thanks, that works. The difference that i had in my code is that my P... (by savavampir)
by Toyman
Using globals in headerfiles
 
Hey, I've just officially joined c++.com after lurking for the past few years. I've been having trouble with globals in header files in my projects. I have gl...
[3 replies] Last: If you want these variables available in other files why not make them... (by closed account 1yR4jE8b)
Error correction
 
hi, please help me correcting this error or at least suggest some. error C3892: 'sofa::helper::vector<T>::operator ' : you cannot assign to a variable that is ...
[10 replies] Last: statesman i can't understand what happens but i can give advance to yo... (by david91)
The Difference Between These Two Statements
 
I come from a C#/VB.NET background and I'm a little confused about these two statements: player would be declared as a public class. void somemethod() ...
[9 replies] Last: That was really insightful, thank you very much helios. (by Translucent)
by xanonx
The tm struct, mktime, and streams
 
Hi all, first post. So I'm working on a project where I have a class for parsing times from a file into tm structs which are then converted into time_t's (to be...
[4 replies] Last: As of the update I have removed the streams with out issue. I've also ... (by xanonx)
When I Am Implementing Function Prototypes
 
Hi, Very new to c++. I am using VS2008 with pre-compiled headers. Let's say I have this: [player.h] #ifndef _PLAYER_ #define _PLAYER_ class pla...
[4 replies] Last: Thanks (by Translucent)
combine strings and numbers from different files into a table
 
Hi, I have three files and want to combine pieces of them into a table in a new file. 1st file: names of wifes, some random information, their birthdays 2nd ...
[2 replies] Last: as your needs are very likely to change over time, I recommend you sto... (by kfmfe04)
Standard convertion for UNICODE symbols
 
Hi I am pretty new to C++. I am working a program that will eventually do some type of text conversion of a UNICODE text file. My question is this in ASCII ...
[4 replies] Last: text compression on Unicode text What exactly do you need a table for... (by helios)
openGL with sfml
 
i've managed to do some of the tutorials in the SML website but somehow i am not able to do the one involving OpenGL. i am using the code::blocks IDE. the t...
[2 replies] Last: sorry, i may have pasted the wrong link in my first post. i was actual... (by sanji2011)
Which compiler is best?
 
In many threads, many professionals point such things like "this library is non-standered" or "this library/functios is OS dependent". Do we have any compiler w...
[2 replies] Last: If the function is not in the C Standard Library or the C++ Standard L... (by kbw)
Passing a vector to a print function in another class
 
I read the forums all the time and this is my first post, so please bare with me. I have a simple question on how to pass a vector to a member function in anot...
[2 replies] Last: You can use the code format tags to format your code. Have you looked... (by kbw)
by Giri89
Inserting Value into an Array of Structures
 
Hello, I am quite new to C++ and was hoping someone could help me with the following problem. I seem to be getting an error message when I try and insert...
[3 replies] Last: Thanks so much guys! (by Giri89)
HELP boolean subfunction not working
 
Hi, I'm new to C++ and I'm taking a course in it. I'm not asking for someone to do my homework because I spent a long time on this problem and I want to know wh...
[1 reply] : In isValidNum, num is an array. array means (i+1)th element of that a... (by hamsterman)
a source code with trouble
 
hi: I have a source code below,I can compile it with no error,but when I run it ,a error jump out call:"debug assertion failed".I don't know where the wron...
[2 replies] Last: Vector::Vector(int s) { buffer = new int[size = s]; Don't do that... (by kbw)
Writing a function to read a password from the console
 
Hello, I am trying to write a function that reads a password. The function hides the characters (with an asterisk) and stores them in a std::string. Here it ...
[1 reply] : failbit it works incorrect here < pass.append(&read) >....try to print... (by david91)
inputted letters to asterisk
 
Ok so my friend bet me that I couldn't write a user login program so I am trying to but I am having trouble with getting a certain line to change if the user wa...
[15 replies] Last: Great! Thanks you guys so much you really helped me out! : ) (by jakehero95)
by ramako
using arguments of argv
 
Hi guys, I am having problems generating a sequence of random numbers determined by the argv argument when i write ./random 20 I want it to generate 20 ra...
[2 replies] Last: thanks, thas was indeed the problem ;) (by ramako)
Need help with threads (pthread library)
 
First, here's all the relevant code: #include "lab.h" #include "rob.h" #include "rob1.h" #include "rob2.h" void* RoboLoop(void*); labyrinth* lab; unsigned i...
[6 replies] Last: I just did it exactly as it is described here: http://gabrielshen.blog... (by Zaibusa)
June 2011 Pages: 1... 1920212223... 28
  Archived months: [may2011] [jul2011]

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