Beginners - May 2014 (Page 29)

Creating a space with an int variable in a 2d array
 
Hey! I'm a beginner and using c++, i was wondering how do you create a space with an int variable in an array. int Array = {{ ' ', 0, 1 , 2 , 3, 4 ,5,...
[16 replies] Last: or send me a pm with your email and i will reply to it (by Codermik)
by Huppa
Line Functions (Slope & Direction)
 
Hello! - My task is to: Write a program with modular structure that asks the user for two points on a line, calculates the slope of the line, and determines...
[3 replies] Last: How would I go about checking slope within a function? Tad bit confus... (by MiiNiPaa)
help with using loops to find a maximum
 
I am trying to make a program that finds the maximum of a function f(x) over an interval a<=x <=b by starting at x=a with a step size of Δx.I want to evaluate ...
[1 reply] : 1. Format your code a bit more. 2. 'x++' is definitely not what you i... (by keskiverto)
Declaring "Global" variables
 
First a bit of background. Im very new to programming, having had my first college about it two weeks past now. before, knew about as much about c++ as my do...
[8 replies] Last: vector <int> mapx;//previous declaration of the "inside" vector nee... (by AbstractionAnon)
array, strlen in C
 
if im going to enter some elements into an array, after entering the total number of elements(size of array). And im wandering the following code of (char test ...
[2 replies] Last: The parameter passed to strlen() is a pointer to the start of the arra... (by Chervil)
by hwy63
exam study question
 
Fill in the code below to reverse the order of array1’s contents and save it into array2 (Assume array1 contains valid data, and you may ONLY declare ONE extr...
[3 replies] Last: This still doesn't work out for me, thanks anyways! (by caleqele)
Putting vectors in vector
 
Hello, I would like to use for loop to create vectors in my main vector. I would like the first vector to be of length of 1 another of length of 2 and the 'n' ...
[4 replies] Last: The ":" is part of the syntax of range-based for. That variant of for... (by keskiverto)
value from integer variable to string variable
 
I want to assign the value from an integer variable to a string variable. If there integer variable had 1111 I want the string variable to have 1111 also. This ...
[4 replies] Last: Than you guys @NT3 @eyenrique @TheGentlmen (even though "if its to com... (by Leslie26)
by enemy
hash<<5
 
Dear All! Please, can someone make me clear this line: hash = ((hash << 5) + hash) + c; /* hash * 33 + c */ meaning: hash = ((hash << 5) + hash) + ...
[9 replies] Last: Hello, sorry for studpi q but just could not resist: is 0 also a sign... (by MiiNiPaa)
hangmann
 
making a hangman game. usually use a dictionary file but coded in a single word to guess instead. ("jumping") running this, it works for a while, but it never...
[3 replies] Last: Your welcome :) I had made some changes since my original post, and... (by Codermik)
by enemy
C++
 
Hello! Please, WHO is developing c++? In what (programming) language is written c++? Many thanks!
[2 replies] Last: Most C++ compilers are written in a combination of C and assembly, and... (by TwilightSpectre)
by enemy
Equotion explanation
 
Hello! Please, can someone show me, if possible on example, how to we get that: ((hash << 5) + hash) + c = hash * 33 + c Meaning: ((hash << 5) + hash) =hash ...
[1 reply] : I thought your other thread did already provide you enough information... (by keskiverto)
by enemy
Hash function
 
Hello! Is hash function part of mathematics and which part of? (which area of mathematics)? many thanks!!!
[2 replies] Last: Thanks!!! (by enemy)
Program to display SSN.
 
Good evening, basically I have a program that requires the following: - Prompt the user to enter a SSN. - Verify that it is in the correct format. xxx-xx-xxxx ...
[4 replies] Last: Doh, I can see what I did wrong. Thanks guys, it's perfect and it's w... (by StingRaptor)
by danzal
why does my answer get a lot of decimals
 
my answer is example 1.000000 why is it so ? #include <iostream> #include <iomanip> using namespace std; int main () { int invno, quantity; dou...
[1 reply] : #include <iostream> #include <iomanip> using namespace std ; int mai... (by JLBorges)
So I'm gonna try SFML...
 
Well it's 5:13am and I'm trying to go through the SFML API to learn some of the functions.. Here is my code to make a snowman! I would like to know if any...
[10 replies] Last: I guess that's my queue to get some sleep. I appreciate the help, this... (by closed account L6b7X9L8)
by ak16
Proxy Object
 
Hi friends, can any one please help me to understand what is proxy object and what really the situation comes when we should use use proxy object? I tri...
[3 replies] Last: thank you guys. As i understood , proxy object is just like a inter... (by ak16)
by gghf
I cant find where to put friend when describing the class
 
http://puu.sh/8KePg.png I keep trying to find where to put 'friend' when I want to define the class outside in this format in the screenshot i included... I ...
[1 reply] : http://www.learncpp.com/cpp-tutorial/813-friend-functions-and-classes/... (by closed account j3Rz8vqX)
by road
read 1D array, get count and total
 
Need to figure out how read a 1D array from a file to get the total count of numbers and and the sum of the numbers in an array. The number of numbers in the a...
[1 reply] : How would you read data from a file?http://www.cplusplus.com/doc/tutor... (by closed account j3Rz8vqX)
Q: Modifying 2D array of char in void func
 
I'm currently stuck on a problem where I am passing a 2D array of char and trying to modify its values, but my function is designed to return a bool; So I'm run...
[2 replies] Last: Wow, that's an embarrassing mistake. Thank you for opening my eyes. -_... (by Valandu)
May 2014 Pages: 1... 2728293031... 55
  Archived months: [apr2014] [jun2014]

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