General C++ Programming - October 2010 (Page 11)

myVector push_in() Just Not Working
 
I spent my day today playing around with a vector class I was building, attempting to convert the std::vector functions to mine as a starting point. Insert (or ...
[5 replies] Last: I mean the direction to which it points. tempVector = pVector ; Yo... (by ne555)
by natie
saving as .txt file..
 
Hi. Could anybody help me about how can I save the input from keyboard as a .txt file? Thanks
[2 replies] Last: oo thanks..! (by natie)
by Gindoc
C++ modeling tool
 
Hello everyone, I am currently coding for myself a C++ modeling tool and i have just released a beta public version (in case of someone else may find it usef...
[no replies]
by LB
operator, or comma operator?
 
By deafult in C++, the comma operator allows you to perform calculations where only an expression is expected: [code firstline=6]int x = 3; cout << (x += 2, x...
[2 replies] Last: The link you posted is a 404, so I don't understand your response. Als... (by LB)
fatal error c1004 && error C2601
 
/*Project Program for Hospital Database Queue array.*/ #include <iostream> #include <cstdlib> #include <fstream> #include <cstring> #include<cmath> us...
[1 reply] : Please put your code in [ code ][ /code ] tags, so we can find the lin... (by NGen)
General Purpose Library
 
I have posted a general purpose lightweight library on my website: http://peeldog.com/code/7-peellib It provides a wrapper around some commonly used OS fu...
[no replies]
string::find double quote Problem
 
I can't seem to understand why the code below enters the if statement: size_t found; string after_token = "\"testing testing testing\""; found=after_tok...
[2 replies] Last: the problem was that I was erasing the entire line. I changed the l... (by piratemcplunder)
by Miky1
pair <> question
 
Hi there, Let's say we have the following: #include <map> #include <string> #include <vector> #include <algorithm> using namespace std; typede...
[1 reply] : I think you could define a global templated function operator<(): ... (by PanGalactic)
by rej3kt
Can't figure out why my class is failing epically.
 
This is my main.cpp #include <iostream> using namespace std; #include "randomclassheader.h" #include <string.h> #include <cstdlib> int main() { c...
[5 replies] Last: your first attempt worked because you use the variables you declared. ... (by coder777)
string::find_first_not_of Problem...
 
I am working on a program that involves a lot of string manipulation and after many hours of beating my head against the wall I cannot seem to figure out what i...
[3 replies] Last: I love you. Thank you so much. (by piratemcplunder)
by fortis
converting a japanese string to romaji
 
I'm trying to write a sync program for my mp3 player but some of my mp3 files's names are in japanese and I need to convert them to romaji( the sound in english...
[5 replies] Last: the other thing i tried is using the online converter with http://www... (by kfmfe04)
by wtf
Strong vs Weak typed languages. Is it possible in c++ to point to variable type?
 
I want to have a data member that points to any of a number of predefined types. How is this possible? Say if I want it to point to an int I can set it to p...
[4 replies] Last: Your matrix class should not have a fixed number of rows and columns. ... (by Duthomhas)
rand() prefers higher numbers?
 
So for my dad I had to make this little program test the the reliability of the function rand(). I seed it, as usual, with time. But I've always thought it woul...
[8 replies] Last: BTW, the libc's randomizer is pretty weak (that is, predicatable). You... (by Duthomhas)
Operation on Unlimited Digits containing Number
 
Hello... I'm writing a C++ program to find the definite integration of any function. For this purpose, I need to deal with numbers having infinitely small va...
[2 replies] Last: I'd suggest writing an interface to a CAS such as Maxima or Wolfram Ma... (by helios)
double display when outputting...
 
I have an assignment in class that asked me to write and unknown number of records(but less than 20) to a file and read it back and display it. i got this to...
[11 replies] Last: I knew something was missing!!! i couldn't find the right include to..... (by kyle11778)
by wtf
const int pointer
 
const int * CI; Does CI point to a const int, or is CI a const pointer that points to an int? Edit: And also in the same vein, is a "One Eyed One ...
[3 replies] Last: No, an array size must be a constant known at compile-time. (by Athar)
by dkaip
defining variables at real time
 
Hello. I am trying to define new variables at real time and i dont know how. for(int i=0; i<imax; i++) { string istr=int2str(i); ...
[12 replies] Last: I just open. I will try it soon as posible. Thank's very mutch for gr... (by dkaip)
by wtf
Program haulting when trying to assign element in bool array to false
 
matrix.h: #ifndef MATRIX_H #define MATRIX_H #include "dlist.h" #include "zlist.h" const int MAXSIZE = 4; template <class Instance_of_Type, class Ma...
[3 replies] Last: I did what you suggested and changed all of the if (digits[x-1] == tru... (by wtf)
Need suggestions for multithreading pattern
 
I have a chunk of memory (bunch of arrays) that's protected by a simple mutex X. Threads A and B will read and write into that memory. Periodically, thread ...
[2 replies] Last: Yes, believe it or not, spawning a bunch of threads without the need f... (by kfmfe04)
array of chores
 
I am creating a random chore generator. There are two seperate lists of chores, 1 for weekdays and 1 for weekends. I am using a random number generator to deter...
[1 reply] : If you want to print a specific message chosen by a random number, her... (by hamsterman)
October 2010 Pages: 1... 910111213... 23
  Archived months: [sep2010] [nov2010]

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