Beginners - October 2014 (Page 26)

Helps please
 
could somebody write me the code for this i need it .. n n S=∑ i/(i+1)² and S=∑ i²+(i+1)³ i=1 i=1
[1 reply] : Use a loop. (by keskiverto)
x^=2;
 
What would the value of x be at the end of this snippet? int x = 12; x ^= 2; And how did you get to your answer?
[4 replies] Last: Thank you @Stewbond! @mutexe I was just looking for a clear explanati... (by dunnDolphin)
I fail to understand cin while looping. (Total noob)
 
I'm a beginner programmer. I'm having trouble understanding why my code won't execute correctly. There's 2 main problems I'm encountering. My program is suppose...
[3 replies] Last: I'm attempting to understand that link, without success so far... but ... (by seriphim)
Problem with std::find
 
This is the error message I get when I execute the code below Testing.cpp: In function ‘int main()’: Testing.cpp:28:45: error: could not convert ‘std...
[2 replies] Last: Oh thanks m8 (by closed account EwCjE3v7)
Recursive character counting
 
I've been having all kinds of trouble figuring out how to count a specific character through a recursive function (I can do it fine through iteration...) but th...
[7 replies] Last: Ahhhh thank you dhayden, I forgot to call the function again if it act... (by eladage)
Won't allow me to return to menu
 
It just continually says to put in a new number. How do I fix? void add_values () { cout << "Please input the a number between 1 and 10 and after i...
[3 replies] Last: though the && makes it skip i=0 and go straight to i=1 (by Magnes34)
by sunOsk
Random Int problem, need help!
 
I am "coding" a rock paper scissor game (in Swedish because my c++ school book is in Swedish) The book gives me the code and I am supposed to type it down and u...
[4 replies] Last: Thanks! It's working now. (by sunOsk)
by clodi
#INF ..what is happening is rather bizarre
 
I am writing a piece of code that outputs a list of DOUBLE numbers on screen. I basically have 2 quantities, 1) a time step 2) a time total The time ste...
[3 replies] Last: why does the total start tripping as soon as the time step does? Wel... (by MiiNiPaa)
Auto Creating a library book id code
 
I am writing c++ code to develop a library database software. This involves: Adding a book to the library. Ill ask the user for book name,author's name and y...
[4 replies] Last: omg! i love you. Thank you sooo much!!! Esslercuffi. (by omkarborkar95)
Function Calling
 
How would I call this function in my main function. void print_calendar(int month, int year, ofstream& output) { }
[2 replies] Last: What do you expect line 19 to do? Where have you defined a print_cale... (by pheininger)
Why does the code do not give error?
 
Why does this code do not giver error, the size of century is 3 elements, still it holds for elelments={'h','e','l','\0'}???? #include<iostream.h> #inclu...
[7 replies] Last: What is actually happening (probably) is that century is not actually ... (by Esslercuffi)
regarding over loading of operators
 
why the operators like =() must surely be the member functions? if time permits pls explain me with some code with regards, vishnu
[1 reply] : class foo { foo(int) {} //Implicit conversion enabled constructor... (by MiiNiPaa)
Tic Tac toe
 
I am trying to make my code look like the following: New Game: X goes first. ----------------- |R\C| 0 | 1 | 2 | ----------------- |0|||| ---------------...
[3 replies] Last: I need to have my game in a multidimensional array. my game box needs ... (by japperx)
GLOBAL VARIABLES HELP PLS
 
Hi guys I need help with my code I have to write this program "Write a C++ program that will calculate the value of “e” (Euler’s number, e = 2.71828…) u...
[2 replies] Last: so this is what I have now. I removed the header file. /*function.cpp... (by dksam123)
Little help please
 
I have a program to write that uses an array to read from 2 different files. The first file is named Teams.txt and displays all the MLB teams that have won the ...
[4 replies] Last: Thanks for the help I fixed the code and it runs great! (by guglaak)
by stupid
What is a hexadecimal/octal number?
 
//this is probably a very stupid question I'm still on the basics tutorials, stuck on Constants. Everything was OK up until now. No one told me I had to be g...
[3 replies] Last: Thanks so much. It makes a lot of sense now! (by stupid)
by cGuru
Error C2087 & Error C2133 Please
 
Goal: Read contents from a file and use as the size of a 2d array. Problem: C2087: Line 27 : "a1" : missing subscript C2133: Line 27 : "a1" : unkn...
[1 reply] : you can't declare arrays with variable subscripts. Look into vectors.... (by Esslercuffi)
countSort() function not working
 
I've written the following code. When I give input an array it outputs the same unsorted inputted array. Example: Input: 5 6 1 8 3 2 Output: 6 1 8 3...
[1 reply] : Whatever else counting_sort() is doing, it's not modifying the array y... (by tipaye)
Please help
 
Hello all, brand new to the forum. I was thrown into a Computer Science class out of no where and already have an assignment with little knowledge of what's goi...
[7 replies] Last: And after a long weekend, I found a solution to problem 2. Thank you a... (by aids8544)
by weee
question about range for loops
 
i wonder is for(auto i:{0, 1, 2, 3, 4, 5}){ cout << i << endl; } technically and syntactically identical to vector<int> v{0, 1, 2,...
[4 replies] Last: simply, int a =5; cout<< a; // not cout << *a; int *pt = &a; cout <<... (by anup30)
October 2014 Pages: 1... 2425262728... 70
  Archived months: [sep2014] [nov2014]

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