Beginners - May 2014 (Page 10)

What does srand actually do?
 
Ok, so I understand how srand works. It creates an ever changing 'starting point' for the rand function to produce a 'random number' that will be different each...
[1 reply] : srand() is the algorithm for generating pseudo random numbers. The see... (by admkrk)
how do you use mod
 
how do you find the ones tens and hundreds place in a single int
[3 replies] Last: thanks (by Dexter 3202)
Optimizing function
 
Dear experts, Can I optimize the follow code, perhaps by pointers. Thank you in advance, double F(double x0, double x1,double x2, double x3, double x...
[15 replies] Last: dhayden: Extremely useful tip. Thanks a lot. (by alavifazel)
Passing Null Pointer to a Function
 
Write your question here. How do you pass a NULL pointer to a function? /* * Chapter 13 Problem 3 * * Modify the program you wrote for exercise 1 so...
[11 replies] Last: LowestOne, Thank you for providing the example code. Very helpful in... (by phztfte1)
pack char in a line
 
I have a question how would you packs 4 characters at a time from the line into an integers ?
[5 replies] Last: You (a) cannot return an array like that and (b) have wrong return typ... (by MiiNiPaa)
by p al
merge function
 
Hi guys, I wrote this merge function for two sub-arrays of equal size(so the resulting array size is an even number). Although it works if size(of resulting ar...
[2 replies] Last: Oh man some times it's the most stupid thing! Thanks a lot! (by p al)
Beyond Boundaries of a Pointer Array
 
Write your question here. The program work. However, see questions starting from line 59. /* * Chapter 14 * * * * */ #include <iostream> u...
[2 replies] Last: Thank you. You confirmed what I thought would happen. I fixed the pr... (by phztfte1)
Wrap Around 2D Vector
 
Professor mentions a modulus operator for 2D arrays. He mentions using a vector<vector<Spot> > tor; for avoiding dynamic mem allocation so I rather use that. E...
[8 replies] Last: Thank you very much for the explanation and examples! That solved most... (by Junishi)
Help me with this, please open to see my problem
 
Im making a simple ATM Machine program for my school project. The main menu works fine, but whenever I choose Balance Inquiry then choose Main Menu sub optio...
[3 replies] Last: Your displaymenu function is not returning anything although it declar... (by MiiNiPaa)
writing in the windows?
 
Now i can make a window, but i don't understand to write the window. Somebody can teach me?
[5 replies] Last: Read Ivor Horton's Beginning Visual C++ 2012. (by AgentX4000)
Err in liner searcing programm
 
hi all when i compile this get some errors i don't know fixed & where is my mistake :( #include <iostream> using namespace std; void input(int ,int); voi...
[2 replies] Last: 1. void liner(list ,int len,int no) function needs to return int... (by rich1)
I need a better explanation about 'bool'.
 
So i'm currently a c++ starter as in i'm really a completely in programming i have no programming experience and bool confuses me. That's why i came here lookin...
[3 replies] Last: Hi, Also realise that relational statements (Which involve relational... (by TheIdeasMan)
Why do I get different output?
 
Hi, I am really curious as to why I'm getting two different results with the code below. #include <iostream> #include <cmath> #include <cstdlib> #inclu...
[1 reply] : double normal(){ //Declares double value. For now it is filld with ... (by MiiNiPaa)
by yepMe
Difference between namespace , library and namespace
 
Hi Everybody, I have started studying c++ and I came to know about header files , libraries and namespace. But I am confused regarding their differences . He...
[5 replies] Last: They aren't, not really (unless there is another meaning to namespace ... (by TwilightSpectre)
Help with installing gnu gcc 4.9
 
So i started reading C++ primer 5th edition and the book says that they used the gnu compiler. I was wondering if there is an executable installer for this c...
[3 replies] Last: Thanks for the help man appreciate it. (by rtz1234)
Scoreboard problem
 
Hi, im having troubles with my scoreboard, i should input names and racetimes for each name, and it should rearenge it from best to last. But this dont work, pl...
[2 replies] Last: Do not use C I/O with C++ classes. If you need several parallel arrays... (by MiiNiPaa)
by SVcpp
How do I capitalize?
 
//Sam Vernaza CS 162 Lab #2 2 //Program that writes out and compiles employees initials 3 4 //The first section of this program is going to take init...
[6 replies] Last: I'm so bad at this programming thing No you aren't.Everyone's a be... (by Pter0dactyl)
by SVcpp
HELPP!
 
Hello, I'm new to programming and this really is driving me crazy. I need to make this if statement work, but I keep getting an error that says, "ISO C++ fo...
[14 replies] Last: looks like i have to make sure one thing: do you understand all the... (by Pter0dactyl)
skipping # sign in an infile
 
how do you skip # from this code in order to know the name and the price name? #include <iostream> #include <fstream> #include <string> #include <iomani...
[3 replies] Last: #include <iostream> #include <fstream> #include <string> #include <ve... (by Yay295)
Two Values From a Function
 
Write your question here. The problem was to write a function that takes two arguments and provide two separate results. The code below works. However, is thi...
[6 replies] Last: MikeyBoy, My apologies. After posting, I read my post and saw that I... (by phztfte1)
May 2014 Pages: 1... 89101112... 55
  Archived months: [apr2014] [jun2014]

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