General C++ Programming - September 2010 (Page 8)

simultaneous iteration over several vectors
 
Hi guys. Is there a way to iterate simultaneously over two or more vector in c++? The only thing I could think of is creating a loop and incrementing the i...
[3 replies] Last: NOTE: operator on vectors is not necessarily slower than iterators. ... (by jsmith)
sizeof() (1,2)
 
Hi, I was confused with the "sizeof()" function. In the main(), why calling the function getSizeof(list1) will return 4; while calling sizeof(list1) return 72. ...
[31 replies] Last: There is nothing magic about const and templates. const works the sam... (by jsmith)
problem in program that finds words that contain a certain letter from a list.
 
Hi Everyone, I wrote a program for Linux which goes through a file called List.txt, finds words with the letters M and T in them and then pastes these words i...
[12 replies] Last: Yup, they both worked and now the program runs perfectly. Thanks alot... (by waqqassheikh)
unicode to string array
 
I need to initialize array of English and Geramn alphabets. The German alphabets has the unicode as follows: 00C01C(U_double_dot), 00C004 (A_double_dot), and ...
[13 replies] Last: I hope this link could help you. http://msdn.microsoft.com/hi-in/gogl... (by sujalsheth)
matrix operation
 
Hi, i want to know is there a standard library in c++ for doing matrix operation (multiplication, determinant for example). Also, i goolge and fell into this...
[3 replies] Last: There are some libraries which include also matrix operation, but they... (by lseregni)
ignored preprocessor directives
 
Hello everyone, I'm currently working with LTI library for a project which requires signal processing and matrix computation. Compiling such library I've enco...
[3 replies] Last: Thanks for your prompt suggestions, that take me on the right track. ... (by lseregni)
I dont know how to eliminate decimal positions
 
ok so here is the code // ----------------------------------------… // Autor: Victor Ayala Alvarez // Num Est: R00282000 // Problema: Average Rainfa...
[2 replies] Last: Thanks a lot Athar 829, I modified it and instead I put from: co... (by vic1234)
creating an output file for each instance of a constructor?
 
I have created a class that allows me to create and move "space rovers" on an imaginary grid. For an assignment, I need to make it so the rover can output to ...
[6 replies] Last: Any professor that punishes you for independently studying is a moron.... (by Disch)
Mosaic ICPC Challenge
 
So I am preparing for this year's ICPC and have been practicing old problems. I just ran into this really "fun" mosaic problem... http://acmicpc-live-archive.u...
[18 replies] Last: I made a 7x7 by hand so oddxodd is possible but only if both dims are ... (by kevinkjt2000)
by upad
error using struct
 
Can someone help me with the following struct, for some reason, I am able to enter data only when my variables are of string type and system doesn't allow value...
[6 replies] Last: not sure why my output is not the same as yours...as I pointed out, my... (by upad)
Problem with io
 
Hi. I wrote a class like below: class MYCLASS { private: char Number ; public: friend ostream& operator<<(ostream&, MYCLASS&); ...
[5 replies] Last: I have two other functions except constructor and destructor till now.... (by majidkamali1370)
Code review: Locate exe file in *nix
 
Hi all. Those of you in the know, please review my code. Due to the "If you could create your own language..." thread ( http://www.cplusplus.com/forum/loung...
[2 replies] Last: Thank you for your quick help Albatross . I didn't expect such swift ... (by Duthomhas)
by hannes
string object conversion to double
 
Hi, Is there a way to convert a string object directly to a double instead of this: string str = "3.14159265"; double pi = atof( str.c_str() ); Ha...
[4 replies] Last: You can overload =. That'll be quite short after you declare and defin... (by Albatross)
by spamme
class, 3D-Array, return style
 
Dear all, maybe my post in the "Beginner" section wasn't right. Thus I linked it: http://www.cplusplus.com/forum/beginner/28774/ Maybe my request is un...
[2 replies] Last: Sorry, my question is after the first small code block, with an additi... (by spamme)
Const Class Qualifier (1,2)
 
I am not able to understand what "const class" qualifier stands for in the following declaration A(const class B& a) { std::cout<<"class B is converte...
[25 replies] Last: No, non-const actual parameters can be implicitly converted to const. ... (by jsmith)
error in code (1,2)
 
i have something like this vector <vector<vector<char>>> arrCompany; Buf = "carlsum, 22674, Carl Sum, 4115, 1, 65--84279319, 65--67353779, , , ,...
[30 replies] Last: yes I designed it wrongly cause I thought vector<vector<vector<string... (by carlsum1986)
Is there a way to use templates as static members of another class
 
I have the following code structure: ----------------------------------------------------------- //myClass.h myClass{ public: void DoSomething(void); ...
[5 replies] Last: static const integral types can be initialized in the class without a... (by sohguanh)
Running at Startup
 
I've been googling around trying to find a way to use the registry to run a program at startup. I don't know if I was successful or not, because as soon as I...
[6 replies] Last: http://www.softwaretipsandtricks.com/windowsxp/articles/169/1/Removing... (by blackcoder41)
float to int blunder can any one explain this
 
here is a simple program : #include<iostream> using namespace std; int main() { int n; double z; cin>> z; cout <<z <<"...."<< (1/z); cout <<"\n"...
[4 replies] Last: See this: http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.18... (by Disch)
letter count
 
I write a program that count # of letters in a text file and now I need to tweak it a little bit using functions that: 1-take character as input parameter and ...
[10 replies] Last: for(int max=frecount , min=frecount , inti=1; i<27; i++) { if(ma... (by curioustoknow)
September 2010 Pages: 1... 678910... 20
  Archived months: [aug2010] [oct2010]

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