Beginners - May 2014 (Page 38)

Error in my programming
 
solve error #include<conio.h> #include<iostream.h> void main() { double s=1,n,i; clrscr(); cout<<"Enter n(n=2k):"; cin>>n; if(n%2>0) { cou...
[16 replies] Last: codeblocks-13.12mingw-setup-TDM-GCC-481.exe http://www.codeblocks.or... (by MiiNiPaa)
Array of random numbers
 
Hi, I seem to be having a problem with my code and I’m unsure of how to fix it. The first time the program executes, it delivers one number yet the iterations...
[6 replies] Last: [code firstline=8] int i = 0,size = 0, seed, temp; int array ; Th... (by Daleth)
Need help with variable argument list & template
 
I am trying to write a simple function which will take an arbitrary number of arguments and return the maximum out of them. It works for individual data types l...
[2 replies] Last: Thanks keskiverto. Will check it. (by sanjay2001)
Can't get void statement to not give answer from wrong inputs
 
Hi. I'm trying to get a calculation in a void statement to 1)recognize wrong inputs, 2) NOT print out an answer and then 3) return to the main menu. It ...
[1 reply] : 1. Use code tags on the posts. 2. If you want to return from a functi... (by keskiverto)
unexpected token(s) preceding
 
syntax error : missing ';' before '<<' unexpected token(s) preceding ';' #include <iostream> using namespace std; // Base class class nut { ...
[1 reply] : http://ideone.com/gdkpyp scroll down to errors, and read the errors .... (by LB)
Problem in graph () in Windows 8
 
error in code #include<iostream.h> #include<conio.h> #include<stdlib.h> #include<graphics.h> #include<iostream.h> void main() { clrscr(); int x,y...
[6 replies] Last: I tried this on another computer and it worked in windows xp (by FShapouran)
help with the program; How to find the largest integers and equal integers
 
I m having hard time to fix my code. I need to find the largest integers among three integers and also need to display when all three integers are equal. ...
[3 replies] Last: if (num1=num2=num3)//Assignment operator What you want is equality o... (by closed account j3Rz8vqX)
by ak16
Satck and Heap
 
Hi friends, What is the difference between Stack and Heap? When we should use Heap/Stack? Which one is fast?
[5 replies] Last: yes I agree with you AbstrAnon. After getting address of object from h... (by ak16)
help with uninitialized local variable
 
I'm having trouble debugging this, im sure that im initializing 'r' on line 11. #include <iostream> #include <iomanip> using namespace std; int radi...
[1 reply] : Integer data types is causing you issues: r = radius(r); c = 2 * (3... (by closed account j3Rz8vqX)
Loop in Non-Member Function from Class
 
Need help on this! I am trying to use a loop with an array within this non-member function. How would I call an array and then use it to loop starting with rov....
[1 reply] : Do you want to pass an array to this method or process an array before... (by closed account j3Rz8vqX)
Getting Cursor Postion? (when clicked)
 
Hey guys, I'm new here, so I apologize if I'm not doing this correctly. I need some help in a game I'm making where I need to be able to see where on screen...
[6 replies] Last: Thanks, Disch, that helps a lot. It is in a window, so this would def... (by pellison512)
I keep receiving these errors
 
I am trying to input a loop that displays income generated from ticket sales for 3 nights.. I keep receiving error messages even when I go to the line and thin...
[2 replies] Last: Do I need to include a string of days so it will ask separately the in... (by squirrel27)
Assigning values to letters in a 2D character array
 
Hello, what I have here is a program that reads letters (grades) from a 2D character array and out puts them into a row/column system that shows the grades o...
[1 reply] : Option: // reads grades.txt into 2D array for (int ROW = 0; ROW < 5... (by closed account j3Rz8vqX)
Text File
 
How do you make a text file for a program? I know you use like notepad but what do you put in the text file. Like if I want a ljst of words for a hangman game, ...
[4 replies] Last: Ah thank you (by football52)
by C888
Arrays
 
I am desperate for help here - I have no idea where to start Given an array of angles A = [0 30 60 90 120 150 180 210 240 270 300 330 360] write a program tha...
[1 reply] : Duplicate post. I already answered here: http://www.cplusplus.com/fo... (by Disch)
by Akim
2D array procession
 
I have written 8x8 matrix with randomly generated numbers in a range[-30..45] but I don`t know how to get a diagonal matrix with the same range of numbers and ...
[1 reply] : Header: #include<vector> Standard constructor: std::vector<int> myInt... (by closed account j3Rz8vqX)
Function that displays most profitable day of week
 
Sorry for posting entire code but would be much easier to help. I am trying write a void function which will tally up the totals for each day and then displa...
[no replies]
Question; List the 3 major categories of statement required in a programming language
 
Hi, I m doing the question which asks What is the three major categories of statements required in a programming language in order to be able to solve any sol...
[1 reply] : You'll need to review your course notes. Answers you get here are unl... (by Duthomhas)
Need help on goldbachs conjecture
 
deleted
[13 replies] Last: You need another boolean flag to indicate whether to show "Goldbach's ... (by prestokeys)
How do I "hack" my own programs?
 
For example, let's say I wrote a simple program: #include <iostream> int main() { int i = 0; return 0; } How would I chage the variable i into 2 during...
[13 replies] Last: i will not be optomised away if you don't run g++ with optomizer fla... (by IWishIKnew)
May 2014 Pages: 1... 3637383940... 55
  Archived months: [apr2014] [jun2014]

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