General C++ Programming - February 2009 (Page 8)

class working with int or string
 
We've been working on a class (bag) that holds values in no particular order. This is the original definition, where the bag holds ints: class bag { ...
[2 replies] Last: DOH!!!!!! I am so used to using string without specifying the namespa... (by grcunning)
Manipulating packets data within a network
 
Hi everybody! I am a newbie in cpp and I am trying to make some changes in a simulator through storing incoming packets in a buffer adding 6 bytes to them (a...
[no replies]
Creating a function like Sleep()
 
Just wondering if it's possible to make my own function that does the same as sleep. To wait for a certain amount of time and to kill the thread? If anyone a...
[11 replies] Last: There is a lot more code than this but heres is the code I'm using. I ... (by Mythios)
hash calculation
 
For the function: unsigned int f(const String& S) { unsigned int i; long unsigned int bigval = S.Element(0); // S or '\0' for (i = 1; i < S.Size()...
[1 reply] : I think your bit shift is wrong. Try (bigval<<16) . (by helios)
by ghkdyd
about .. Run time error..
 
I am using eclipse & mingw for c++ programming. I usually handle (multiply, tensor product ) big size matrix such as 1000 * 1000 or the bigger size in my wor...
[4 replies] Last: This sounds like a stack overflow to me. (by helios)
conversion from string to byte
 
hi, how we convert from string to byte, typedef unsigned char byte; string buffer; crypt_encode(byte *,buff_size,CRYPT_DES,Key);//prototype ...
[3 replies] Last: There's a member function on std::string that will do step 1. That gi... (by kbw)
project for dynamic allocation
 
Alright guys im honestly at the novice to begginer status of programing and im in the progress of a project, if any one can help me out with it. The goal of ...
[13 replies] Last: I've just seen that you missed one requirement for task 5 "poly::eval"... (by onur)
problem with cirillic
 
Hi, i have problem with printing cirillic symbols to console. here is my programm #include <iostream> #include <wchar.h> #include <windows.h> using na...
[6 replies] Last: ... (by Mythios)
sort vectors based on other vectors?
 
how do i sort a vector based on the sorting of another vector? this is probably an iterator question, but i have no idea how to do this. say for instance i ...
[2 replies] Last: It would be much easier if you had an vector of a struct or class cont... (by onur)
invalid use of member (did you forget the &?)
 
hi everyone, this is my first post, so bear with me. this is driving me insane. im trying to write a program for Project Euler problem 4. here is the code th...
[2 replies] Last: Haha - yeah got to admit I've missed that myself a few times from typi... (by Mythios)
parsing text file
 
hi i'm new to this forum but not so new to programming except that i've never really messed with reading and tokenizing string data input from a file into a csv...
[1 reply] : getline(file,*ch); Using a string type, not a char . Same for the .... (by Zaita)
by jui
Reading files in a vector or list and save these
 
Dear Expert Programmers, I need your help and advice in the following question and I will appreciate your consideration very much. My present function as at...
[1 reply] : for (int i = 0; i < (int)files.size(); ++i) { FileWvIn tr(files ... (by Zaita)
Template List class wont display insertEnd.
 
Dear All, I am no where near a genius and most of this stuff jsut confuses me. Ive been seeking tutoring but I can't seem to find any of my mistakes(probabl...
[1 reply] : Hi! I guess the first code is list.cpp. This one must #include "list.... (by Smok006)
why i cant run program
 
why when i try run this program there is written STOPPED? :( #include <fstream> using namespace std; int main () { ofstream outfile; outfile.op...
[7 replies] Last: =\ errr ok (by Zaita)
by sknew
Loading and Saving XML files
 
I have to write a code in Native C++ using which i have to load the contents of an XML into GUI and write back the changes done (pertaining to parameters) into ...
[1 reply] : http://www.cplusplus.com/forum/articles/1295/ (by Zaita)
by tition
Calling a template object's member function
 
Dear all, Recently, I wrote some code for computations with polynomials (stuff like x^2+xy+5 - just as studied in high school) over the rational numbers. ...
[11 replies] Last: One word of Advice. "ElementOfCommutativeRingWithIdentity" Is very lon... (by Zaita)
space character bug using vectors
 
hi all ,as I know the C++ line spaces and the tab characters and the comments are dropped out when it passing the C++ lexer state on typical C++ compiler. ...
[1 reply] : Some older compilers do not handle the ambiguity of >> correctly. >... (by jsmith)
by ddii
Namespaces compile error
 
What is wrong? 1ns2.h:24: error: 'NameSpace1' has not been declared //test_nmspc.cpp #ifdef HAVE_CONFIG_H #include <config.h> #endif #include <iostr...
[2 replies] Last: Thank you for your reply, Mr. Helios. (by ddii)
lock resources of remote computer
 
i am working on project to lock, resources(usb, disk drives, cd/dvd rom, folders) of remote computer, can i lock them using c++ please reply waiting egerly
[4 replies] Last: thank you, got it. (by zius oram)
[SOLVED]Can't Figure out whats wrong with sleep?
 
EDIT: Scroll down to see code Main reason I want to find this out is I want to find out something that's equivalent to it that suspends the execution of t...
[3 replies] Last: Fixed it changed the 5 to 100 and its all good. Was getting minus valu... (by Mythios)
February 2009 Pages: 1... 678910... 14
  Archived months: [jan2009] [mar2009]

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