General C++ Programming - March 2009 (Page 20)

by audrei
Resistor???
 
I want to make a program that will solve the value of the resistor.? The user will input the three color indicated in the resistor and the program will solve f...
[3 replies] Last: @turbozedd There are typically 4 stripes on a resistor: 2 significant... (by jdd)
by muster
read binary using winsock
 
hey all. i tried to write a binary object to a file and then read it out and it worked fine. But when i try to use sockets in order to send the object over a so...
[9 replies] Last: i'm searching for something other than boost library. I saw s11n but a... (by muster)
by mykolg
Swapping char's in a string
 
while(!myFile.eof()){ myFile >> code; myFile >> title; myF...
[3 replies] Last: that is a warning, not an error. title.length returns an unsigned t... (by Bazzy)
by muster
binary data problem
 
Hey all. I have a problem in reading and writing binary data to a file. Here is the code: #include<iostream> #include<fstream> #include<string> using nam...
[no replies]
io streams problem
 
I have serious problem actually i want to read many txt files so creating many file streams i want to use just one file stream and I did in pseudo code whil...
[2 replies] Last: even this simple is not working with same filestreampointer CStr... (by ashutosh09)
float divided by int output error I believe
 
Hey Everyone, I hae a problem that I dont know why occurs. I am crating a simple prog for testing runtime of Euclids algorithm and I dont understand the outp...
[1 reply] : Take a calculator and calculate: 0.5 / (log ( 1 ) / log(2)) Then try ... (by onur)
by mykolg
Error Running my Executable
 
This is the error I get when I run my program: *** glibc detected *** ./a.out: double free or corruption (fasttop): 0x0804e8c0 *** ======= Backtrace: ======...
[3 replies] Last: It took me a while, the error was in my header definition file and the... (by mykolg)
Alarm Clock (V1.0)
 
A while ago.. (December 2008) I started an alarm clock. Well today, I found enough time to finish, so I'll just post the code here. It's still in development...
[4 replies] Last: Albatross: Cute program, I love it, but... That program is incomp... (by turbozedd)
CJK in ANSI
 
hi, i have interesting question. somebody knows how to write korean, chinees, or japanese characters to one byte char not widechar. Is it possible? I think it ...
[1 reply] : http://lfw.org/text/jp.html Japanese... I think you will spend a... (by turbozedd)
Timer in C++
 
Hi Guys, Is there any timer functionality in C++ or C? Actually, what I am trying to do is in my network programming code, if a station is idle for cert...
[18 replies] Last: @helios I think periodically checking the state of a station is t... (by kevinchkin)
adding const char * to char array
 
ok i'm adding 2 ints and 2 const char *'s to a char array. The two ints and the first const char * go just fine into the array, but the second const char * does...
[1 reply] : Where is sendbuffer declared? (by kevinchkin)
singleton class.
 
#ifndef SC_H #define SC_H class SC { public: ~SC(); static SC* Get(); int GetNumber(); void SetNumber(int n); protected: SC(); ...
[2 replies] Last: Thanks. (by JohnChen)
how to allocate vector if the size is a variable
 
The size of this vector is large, read by configfile. int j; std::vector<double> *p = new std::vector<double> ; gcc pass, but run in segment fault. h...
[4 replies] Last: Edited my post above (by Bazzy)
returning STL object from container class method
 
I am writing a sparse matrix container class using map<row, map<col, val> > as my data. In my matrix-vector multiplication method I want to return an STL vector...
[3 replies] Last: That is easy. You haven't filled the vector in your operator* program... (by kempofighter)
How to create instance of a class globally
 
Hi guys, I have a class named Robot.cpp and another voInterpreterClient.cpp. I need to create instance of voInterpreterClient.cpp in Robot.cpp globally. voIn...
[6 replies] Last: void Robot::setupConnection() { // This is not a global instan... (by kempofighter)
Some compile problems
 
I got 6 compile error's Compiling... cg_syscall.cpp .\cg_syscall.cpp(16) : error C2059: syntax error : '->' .\cg_syscall.cpp(18) : error C3861: 'multiVis...
[3 replies] Last: You should remove the ";" in line 17 to remove error C2181: illegal e... (by onur)
Program a simple iterator?
 
Lets say, there is an array with data and several threads need to access it simultaneously just as easy as: while( it != it.end() ) { cout << *it << endl; i...
[5 replies] Last: If you wanted multiple threads to traverse a const collection, you'd g... (by kbw)
Getting output of other running programs
 
Hello, I'm sort of new to C++ and have what seems a very tricky feat to me. I am programming a poker calculator and I want it to be able to read the cards that ...
[2 replies] Last: There was a utility I used to use called GameHack... but I think this ... (by turbozedd)
C++ Standard Documentation
 
Is there a free copy of the C++ ISO standard floating around somewhere on the internet that someone can point me to?
[3 replies] Last: For every other standard I've ever worked with, you had to pay for the... (by Skorj)
by zyspt
i'm stuck
 
ok i'm stuck at a place i can't think and figure out. is more like a auto reply thing. when i key in a question, it suppose to answer me back with an answer t...
[2 replies] Last: That's the best approach, but you don't need an iterator if none of yo... (by Skorj)
March 2009 Pages: 1... 18192021
  Archived months: [feb2009] [apr2009]

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