Beginners - July 2012 (Page 30)

Error in Source Code
 
Hi all! I am making a random password generator (source code below). The user enters the amount of characters the password must be, and depending on that value...
[4 replies] Last: Thanks all for the replies and especially Peter87, because you were ri... (by Fransje)
Question about "not the same"
 
I know you can do this: if (this == that) { cout <<"This works"; } how would I modify that first line to say if this isn't the same as tha...
[2 replies] Last: Thank you (by AandR2024)
Annoying Error Messages
 
Ok, The code is supposed to display three rows of asterisks on the computer screen. The first row should contain one asterisk. The second row should have two ...
[10 replies] Last: From what I read about Geany, I believe the N++ program is similar. I ... (by Volatile Pulse)
Indexing an Integer Variable
 
Whats the best way to go about indexing a number? For example, if i wanted to check to see if an integer had certain characters in it how would I do that? Th...
[5 replies] Last: Reference my Palindrome function: bool IsPalindrome(int number) { ... (by Volatile Pulse)
What am I doing wrong!!!
 
When I build and run, it always put the large and small on 1.... I entered the integers, "1,2,3,4,5"... #include <iostream> using namespace std; int main(...
[4 replies] Last: Arrays are not needed, but they are the easiest way to do it. Obviousl... (by Volatile Pulse)
Square of sum
 
I just finished Euler#6, and the sum of square was an easy to find formula (I had no ever had experience with a pyramid number before), but the square of sum fo...
[4 replies] Last: Ah I had some parentheses misplaced when I copied this to paper. (by ResidentBiscuit)
Question...!
 
How do I find the large and small number with 5 integers!? All I know is what is "Greater/less to" with 2 integers and the "IF" statements.
[17 replies] Last: #include <iostream> using namespace std; int main() { int userIn ,smal... (by amchinese)
Array Search cout problem
 
I have the code pretty much done. The only problem I am having is that at Line 36 where I have the cout "Element not found" line with display 20 times multiple ...
[2 replies] Last: thanks for the response. That worked. I thought I had it after I poste... (by BroncoAG)
by dancks
why are global variables in header not visible to .cpp file?
 
source code: .H: #include <allegro5/allegro.h> #include <allegro5/allegro_image.h> #include <allegro5/allegro_primitives.h> #ifndef CL_H #define CL_H cl...
[3 replies] Last: why are global variables in header not visible to .cpp file? You we... (by Volatile Pulse)
by jdrake
The online course I'm taking has examples that aren't quite compatible with G++/Cygwin
 
For instance, #include <iostreams.h> void main() { cout << "Hello\n"; } when compiled with g++, throws a couple of warnings about deprecated hea...
[2 replies] Last: Sorry about the typo in the post with iostreams. There was no "s" in t... (by jdrake)
Libraries?
 
I need help downloading the libraries you use on this website... Help please!!
[5 replies] Last: Thanks a ton!!! That is perfect!!! :) (by bballuver13)
Please help me create a function first time.
 
This is my first time creating a function and I am not sure I understand it all and the return isnt working. If anyone could give me some pointers that would b...
[3 replies] Last: #include <iostream> #include <string> #include <cmath> using namespa... (by Lowest0ne)
by masm32
call your own function call operator
 
Hello I have a class that maps an image into a std::vector. Access is provided by overloading the function call operator: dataType& operator()(int con...
[4 replies] Last: Thanks again, it works now using (*this)(i,j) I'm editing the ... (by masm32)
Project Euler #10
 
NO SPOILERS PLEASE!!! This is the code i am using, it works fine for the test example, but the answer for s(2000000) is incorrect, what am i doing wrong. ...
[1 reply] : unsigned long isn't large enough for the result, try unsigned long lon... (by naraku9333)
c/C++ dynamic memory - compatible?
 
If I have a function in a library that uses malloc , is it acceptable for me to use delete to free it? Not sure things happen like that, but still......
[2 replies] Last: malloc is guaranteed to never call new , and delete is only guara... (by Cubbi)
Problem with Functions
 
Hey, as you can see I am a beginner at c++ and although I think I am improving I am still finding functions quite hard to get my head around. I am writing this ...
[4 replies] Last: Thats solved it! Thank you very much for your help :) (by mikeecb)
Euler#5
 
Spoi ler Don't read if you're actually working on these. Anyway, wow this was easy. My first attempt solved it in .43 seconds. It's a little crude, but...
[2 replies] Last: Haha, that's how mine tend to go. I usually just throw something toget... (by ResidentBiscuit)
Can't even get first program to run!!
 
I have been learning C++ with "C++ Beginners Guide" by Herbert Schildt. I have been using dev C++ with no problems throughout the whole of that course. I decide...
[2 replies] Last: A string that's proceeded with an "L" denotes a wide-string. Wide-stri... (by closed account zb0S216C)
Error With Payroll Program Using Arrays
 
I've done this program over and over and can't seem to get it to execute..... Can anybody find my error/errors: #include<iostream.h> #include<iomanip.h> m...
[5 replies] Last: I figured out my small errors and it finally executed but thanks for a... (by LaC0saNostra)
making a each letter of a word different colors
 
I simply want the user to type a word and then the output is the word they typed with each letter a different color. I am not sure how do go about this though. ...
[1 reply] : In C++ a word is the string data type. You can print out the individua... (by Volatile Pulse)
July 2012 Pages: 1... 2829303132... 54
  Archived months: [jun2012] [aug2012]

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