Beginners - October 2011 (Page 17)

by Zortis
For Loop
 
for (int i = 0, int x = 10; i < 10; i++, x--;) { // } Why isn't this valid?
[1 reply] : try this for(int i=0 && int x=10; i<10 && x>0; i++ && x--) or this on... (by punjabian)
by Zortis
Passing unique items to a file.
 
I'm writing a program that passes random letters to a file, but because it's random I usually get letters that are the same. How can I perform a check before...
[2 replies] Last: After a few segmentation faults and compile errors I did it. Works li... (by Zortis)
Gematria Calculator
 
Heil I am attempting to create a simple Gematria Calculator. Basically, I will assign each letter of the English alpha-beit, have the user enter a string ...
[4 replies] Last: Saturnia and Cristos are names for the same image /archetype. Illumi... (by Saturnia)
How to initialize a struct when initializing an object.
 
So I've built a class that includes a struct as a member variable, and i can't figure out how to initilaize the struct when i initialize the object. the class i...
[1 reply] : And your question is...? (by helios)
by aasaa
Copy constructor witl pure virtual + pointer
 
Hi, // my A.h class A // My interface { public: A(){ std::cout << " A-Ctor ";} A(const A& other){std::cout << " A Copy Ctor ";} virtual ~A(...
[3 replies] Last: The code does not compile. A is not instantiable because it has a pure... (by helios)
while(infile) loop problem
 
Hey I'm having troubles with my while loop, Im sure it somethings simple, but basically, it loops one time too many for example. int main() { ifstream f...
[1 reply] : what is GetNum? a Function? need that function. or try this int main... (by Chathu)
Let's Form an Computer Group!
 
Hi. I would like to form a group of people where we can discuss about C++ online maybe through a mic. I'm quite new to C++ and I'm really excited to learn mo...
[no replies]
by gh24
lpsolve Question
 
Hi Guys, I am using lpsolve to solve the following linear equation. I have my code working fine and I get the correct solution but now I am trying to solve th...
[1 reply] : Anyone have any ideas? (by gh24)
STL Maps Iterator Usage Question
 
I have a map, map<int, map<int, map<int, int> > > color_map; that I am putting color counts in. The structure is as follows: color_map Which ...
[6 replies] Last: Actually the function exists in order to use the map. An easy way will... (by ne555)
by ILC
Operator Overloading question
 
Hi, I was reading a code, the purpose of it is creating a class which could create a dynamic array. There are some questions in its declaration. Hopefully, some...
[1 reply] : = returns a reference to Array<T> to allow for "assignment chaining". ... (by Disch)
Writing Programs with Multiple functions (Edit)
 
hi, i recently wrote some code for a school project and before i start this question, i am not asking you to do this for me, i have just encountered an error th...
[2 replies] Last: this question has already been solved on the original post by Disch ... (by icefalcn)
Writing programs with multiple functions
 
hi, i recently wrote some code for a school project and before i start this question, i am not asking you to do this for me, i have just encountered an error th...
[4 replies] Last: ah, i finally worked it out thanks to your first piece of advice, than... (by icefalcn)
by Cajit
Filling random numbers from cin of vector size
 
Hi everyone I am absolutely freaked out because of one of homework assignment project. I am writing codes to fill three vectors with data conditions: in order...
[6 replies] Last: yes u can see it on fill_randomVector method. I have edited the code .... (by Cajit)
by RapidX
Help/explanation with short program
 
Hello everyone, I'm studying a C++ book and I came across a program in the book that I don't quite understand and was wondering if anyone can explain in deta...
[7 replies] Last: Visual studio is perfectly fine for console based programs, I haven't ... (by TheMeerkat)
Pointer to nested structure
 
I am working my way through "thinking in c++" volume 1, and have come across something I do not think I understand completely: In the implementation of the mem...
[6 replies] Last: Great, got it now! It is nice to get these things right so I don't su... (by bonebreaker)
Ordered List & Templates
 
I have an assignment to create an ordered list using templates so that it will accept all data types. I believe I have the template part of the program correct,...
[4 replies] Last: Alright I finally got it working. Thank you very much for all of your ... (by NickLSSU)
Help with error on a constructor
 
I am getting the following error: "error C2064: term does not evaluate to a function taking 1 arguments" #include <iostream> #include <iomanip> #...
[3 replies] Last: month = m; day = d; year = y; Or you can: Date::Date(int m, int d, i... (by EricDu)
by lrockm
Pointers ! *&
 
Hi, I just begun my journey to C++ programming not long ago. I started with dummies books with the thought that dummies usually is suitable for beginners. But I...
[2 replies] Last: Thanks ModShop ! Appreciate the advice given :) (by lrockm)
by Lauren
Help Formatting output to .txt file
 
This is my code right now and everything works except for two things. When i read the output to the .txt it does not accurately work for NO REAL ROOTS and i ca...
[no replies]
stuck with no errors
 
Evening guys. I am stuck and I have no clue where to turn to. I have looked through the logic of my code several times and the console doesn't throw any error m...
[1 reply] : check line 53 first, it might be one of suspects. (by EricDu)
October 2011 Pages: 1... 1516171819... 59
  Archived months: [sep2011] [nov2011]

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