Beginners - July 2013 (Page 25)

2D vectors
 
can i do something like this, like in arrays? thanks vector< <vector<int> > LN ={ {1,1,2,2,}, ...
[3 replies] Last: @ donvigor I just did this, posted it here to save Cubbi some tim... (by TheIdeasMan)
Class member variables made public.
 
Ok, I've searched for the answer to this, and either I'm not asking right, or no one has asked yet. I understand the concept of keeping member variables of a c...
[5 replies] Last: Having member variables private is a good idea, making them public or ... (by TheIdeasMan)
Help with programming assignment
 
I really wanted to know how to get my program to loop to it's beginning after each switch case executes, so the user can choose another task. After they input a...
[2 replies] Last: @TheIdeasMan, Preciate all the pointers! I'll have to read those refe... (by jakeford)
Prime Factorization
 
Dear All, I'm writing a program to factorize an integer into 2 factors only. for example, the prime factorization for 24 is: 2,2,2,3, but what I want the outpu...
[2 replies] Last: You'll have to prime factorize it completely, making sure your list of... (by Duthomhas)
Game Loop For Text-Based Adventure Game
 
Hey all, I am currently in the process of making a text-based adventure game and am looking for some help with creating a game loop. I have a decent understa...
[14 replies] Last: Thanks! You all are very helpful! (by phasstw)
counting and swapping numbers
 
Ok this is the end of a HW assignment in my c++ class. I included the pseudocode. The error i am having is somewhere at the bottom and the program wont compile ...
[10 replies] Last: I played with it some more and here is the completed answer for anyone... (by hagfish88)
by xismn
Vector of Vectors - a silly goose is me
 
Consider the following programme: #include <windows.h> #include <vector> int main() { typedef unsigned short BitDepth; typedef std::vector<BitDepth> Audio...
[6 replies] Last: Ah, I see. The following seems to have solved the aforementioned probl... (by xismn)
"No Appropriate Default Constructor Available" (1,2)
 
I have been working on this program for two days now and I can see the light at the end of the tunnel, but I am stuck. I posted on here earlier with an a comple...
[23 replies] Last: I am a bit dismayed that your instructor has given you this code. As ... (by TheIdeasMan)
Without "using namespace std;" How can the compiler locate namespace?
 
Please see the code in the following: ================================================================================ ////////////////////////////Circul...
[14 replies] Last: Those aliases in the global namespace only occur in the C library, ... (by akluffy)
rfind Function
 
Correct me if I'm wrong but why does the rfind function display 8? Isn't 4 supposed to be displayed? Start counting backwards from 0 to 4? Spam will be found in...
[1 reply] : No, 8 is correct. It returns the position just like find() does (ie: ... (by Disch)
I have a couple questions?
 
If I wanted to check someones whole computer for a filer, how would I attempt that? What if I wanted to access there web browser and send them to a certain ...
[no replies]
by etneri
Nested Loop Help
 
So, I'm trying to write a loop that will verify that a user has not entered "Q" initially, then I need it to verify whether the first three characters in a stri...
[2 replies] Last: Have a read of this : http://www.cplusplus.com/forum/beginner/104553... (by TheIdeasMan)
error compiling
 
I am very new to code and programming. I keep getting this error "'Servo' does not name a type". when I add <servo.h> to it I get a compiling error. Please help...
[4 replies] Last: its for an animatronic hand. its for an arduino. Its for the receiving... (by ldesimone)
switch with user input
 
i am supposed to use a switch statement to open 3 txt files. i have txt; txt1.txt txt2.txt txt3.txt so for a switch to get user input. //file n...
[3 replies] Last: Thanks guys (by hogwheeley)
by nmn
error meaning
 
[Pls ignored this post and refer to http://www.cplusplus.com/forum/beginner/106710/] Thanks Hi, Can you tell me what this message is ? I think it's a me...
[4 replies] Last: I think it has something to do with the pointer I am using, just can't... (by nmn)
by bebarb
Compiler keeps saying "Local definitions are illegal"
 
Hello! Forgive something so remedial but I'm completely stuck. It keeps giving me the "Local definitions are illegal" error referencing the findLowest funct...
[5 replies] Last: edit: I'm not retarded I'm special. I should really pay attention to t... (by bebarb)
GLUT Question.
 
Why dose this just turn my cube black, it should be lighting it up with white and grey lights #ifdef __APPLE__ #include <GLUT/glut.h> #else #inclu...
[9 replies] Last: http://www.arcsynthesis.org/gltut/ (by Disch)
second program problem
 
hey this is a simple code but i keep getting the same error for line nine, not so sure how to fix it. This is the error-Untitled2.cpp:9: error: `end' undeclare...
[5 replies] Last: endl (with an L) not end1 also moved the semicolon from the beginning ... (by metulburr)
Pointers to functions
 
I was reading the c++ tutorial on this site and made it to this part: #include <iostream> using namespace std; int addition (int a, int b) { return (a+b); }...
[1 reply] : In any case a parameter declared as a function is implicitly converted... (by vlad from moscow)
arrays versus vectors
 
In C++ Why would you use arrays at all when vectors can do the same and has more features, like v.size(), or grow or shrinking, etc.? #include <iostream> #inc...
[2 replies] Last: Why would you use arrays at all when vectors can do the same and has ... (by Cubbi)
July 2013 Pages: 1... 2324252627... 53
  Archived months: [jun2013] [aug2013]

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