Beginners - October 2012 (Page 7)

what does the double& for
 
in this code where i have to make the source for intersection what does the double& mean? void intersection(double m1, double b1, double m2, double b2, ...
[1 reply] : & means reference to an object. So the function accpets not a copy of ... (by vlad from moscow)
by RoMo
Error when adding a for loop to limit password entry tries
 
Hi again, I'm trying now to add a 3 times limit of the number of times a person can type in the wrong password into the console. I did write this code before ...
[2 replies] Last: Thanks for your help dude, It's perfect now :D #include <iostream> #i... (by RoMo)
while loop with a switch attempting to run a looped menu
 
I am trying to create a menu where the patient number is the first thing that is asked every time and continues through my menu functions and repeats until i ty...
[1 reply] : look into the do{} while() this will allow you to put the print statem... (by page3131)
String & C-String Help
 
I need to write a statement that appends the word "Tournament" onto the end of my string variable sport2. I'm not sure exactly what commands to use to do that. ...
[8 replies] Last: Lol that was my fault, yea the sport2+= "Tournament"; works. For som... (by raines883)
EOF
 
#include<stdio.h> int main() { char ch; scanf("%c",&ch); while(ch!=EOF) { printf("%c",ch); scanf("%c",&ch); } } ...
[1 reply] : You are misusing scanf() . You are discarding its return value (which... (by Catfish2)
by dcftci
TEXT FILE
 
I'm sending data to text file 2500 numbers are created and each of them are being sent individually but every single time it says that text file is being modifi...
[5 replies] Last: Well. one method would be to use a stringstream. http://www.cplusplus... (by Chervil)
by HyperX
Draw Console Cuboid
 
hello, i am preety new to C++, so i want to ask how i can draw cuboid in C++ in console program with stars(*) and thath stars are only edges of cuboid i dont ne...
[no replies]
HELP..I am completely lost. I have to write a program that reads from a file called DATAFILE2.TXT
 
I am completely lost. I have to write a program that reads from a file called DATAFILE2.TXT, performs the following tasks, and writes the results of the task t...
[2 replies] Last: first whenever you see yourself copying and pasting as you have stop a... (by jumperkid400)
Finding the highest and lowest values in a numeric array
 
#include <iostream> // need for, cout, cin and endl using namespace std; int main () { const int TEN_INTEGERS = 10; // number of integers int integer...
[2 replies] Last: Thanks a lot, who would have ever thought it was that simple (by cvilorio)
by dcftci
class member definition
 
Can private class functions use private members without specifying in the function implementation?
[1 reply] : Like this? Yes, private functions can use private members. #include ... (by Stewbond)
need to spot the error in this program
 
#include <iostream> using namespace std; int main() { int flag=0; int i_ary = {10, 20, 30}; cout<<"size of array="<<sizeof(i_ary); /...
[2 replies] Last: it is counting 0,1,2,3 3 being the end of the array. so that is 4. wh... (by jumperkid400)
by dcftci
TROUBLE with for loops
 
ok so my program works perfectly but when I try to add a for loop so it turns 2500 times the program starts takes the value to be taken by user but it never end...
[9 replies] Last: thank you for helping I appreciate a lot finally it worked :))) (by dcftci)
Im confused about switch case, please, help
 
Well, really, im a noob here in programing. And now i am trying to learn about switch case, but...i found new coding language. Like cout and cin. The day ...
[6 replies] Last: One thing I've found, which may be specific to my system, is that prin... (by Chervil)
Message to display
 
Hi im trying to make a program that sends a message to a text file or skype and such i only want 1 message so far i only get 1 million messages that keep going ...
[1 reply] : sounds like there is a loop, you may want to take out. No one can help... (by SamuelAdams)
by nexos
2d shapes ...need help
 
NEED HELP HERE I NEED TO MAKE A 2D SHAPE OF block.. plz help ......:) void n1(int x) { for (int i=0;i<x;i++) { cout<<"*"; } ...
[1 reply] : Okay, you have functions to draw the top/bottom and sides. All you n... (by AbstractionAnon)
by RoMo
Simple maths problem helpp!
 
Hi guys, I'd really appreciate a tip in what's going wrong for me in this code. #include <iostream> using namespace std; int main() { float a; floa...
[11 replies] Last: Well, for starters: if(a = b) should be if(a == b) . if(a = b) ... (by IWishIKnew)
Converting from int to char
 
I have an int of 3483498. When I cast it a char, it displays the char 'j'. When I convert back, it is 20. The ASCII for 20 is not even 'j'. I am utterly lost. H...
[4 replies] Last: I tried using itoa(), but it didn't help either. In the end, I used st... (by Amit Shah)
copying files help!
 
I'm doing a project and I need to use two files Random.h and Random.cpp Those two files are in my a05 directory but for this project I'm working in my a10 ...
[1 reply] : You haven't said what program your using. You probably have a \include... (by SamuelAdams)
File not open?!?!
 
#include <iostream> #include <iomanip> #include <fstream> #include <cmath> using namespace std; const int MAX_ARRAY_SIZE = 50; void PrintGen(char lifeBo...
[4 replies] Last: Your file open part of the code works, check the file name. add this ... (by SamuelAdams)
by Kean
c++ (nested For statements) Help~
 
Write a program with nested for statements to display the output as follows: Sum of square of numbers 1x1 = 1 1x1 + 2x2 = 5 1x1 + 2x2 + 3x3 = 14 . . . 1x1...
[6 replies] Last: Move cout<<sum<<endl; out of the inner loop. and change it to cout ... (by codewalker)
October 2012 Pages: 1... 56789... 84
  Archived months: [sep2012] [nov2012]

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