Beginners - September 2011 (Page 45)

what is problem here?
 
#include <iostream> int main() { using namespace std; int n; long k; cin>>n; if(n>0&&n<=100) { k=n*(n-1)*(n-2); cout<<k<<endl; } system("pause...
[7 replies] Last: hmm,thanks (by TURAL MeLIKLI)
by H20
Small loop issue
 
#include <iostream> using namespace std; int main () { double f, m; int counter, number; counter = 0; //line counter is initially set ...
[3 replies] Last: Here's some comments on your code: #include <iostream> using namespac... (by wolfgang)
by aiden
need help in making shapes (1,2)
 
hey guys i just enrolled into a C++ class. and fyi i missed the first week classes cause ive enrolled in a wrong classes thanks to my advisor. im hoping tha...
[28 replies] Last: well but in the assignment the lecturer demanded : "a single number to... (by aiden)
Video game to help learn C++?
 
I know theres one for Java (Robocode, I believe?) but is there one for C++?
[no replies]
by Alx101
#include problems, Allegro
 
Hey i need help! Im making a game in Dev-C++ and im programming in c++, allegro. When i try to include some other libraries like iostream, fstream and sstream i...
[3 replies] Last: Woah! Don't stop using Allegro. Allegro is a awesome lib to use in C++... (by kong288)
reversing C string using pointers
 
I'm trying to write a program that reverses C strings using pointers. So far I have something like this: #include <iostream> using namespace std; in...
[2 replies] Last: Reversing a string: a --> s b --> s + strlen() - 1 Hello world! a ... (by Duthomhas)
c++ payroll help here please..
 
here's my code but stil incomplete coz i dont know how to continue d coding afte return 0. #include<iostream.h> int main() { char james ; int a,b,philh...
[no replies]
help po please mga bossing n professional
 
help po d2 s c++ payroll making..huhu..di nmn kxe kami tinuturuan ng professor namin.. Please input your name: Please input your salary: Please input no of...
[no replies]
generator
 
Im working on a tutorial from a book that simulates a die roll by generating a random number. The only error i get is 'generator' was not declared in this scope...
[5 replies] Last: Hey that was my first post and was great help! Thank you for your time... (by wellSaidd)
question on array as a pointer
 
if an array is effectively a pointer to the first element, then passing an array in a function must necessarily be by reference, and can never be done by value ...
[1 reply] : arrays are passed into functions by pointer, and yes you're correct th... (by quirkyusername)
Calculating Remainder without % Operator
 
I'm working on an exercise that asks to get the remainder of diving two integers using bitwise operators but not to use the % operator. I've read back through ...
[8 replies] Last: That was pretty well explained right there. I couldn't fit the facts t... (by myristate)
pointer confusion
 
my book isnt being very clear on this, so i figured i would come here for the answer. can pointers be used in functions that they arent declared? from what im u...
[2 replies] Last: thanks, that helps a lot. (by mxjabber)
Idea for an exercise, troule figuring out the solution though.
 
So I was thinking of ways to improve my c++ skills and I thought up this problem: "Create a program where a user enters a string, have the program ask how ma...
[2 replies] Last: The solution for a character array would be no different for a string.... (by closed account DSLq5Di1)
Project.obj : error LNK2019: unresolved external symbol
 
I've created a void function which prints a certain noughts and crosses position: void botchoice_a1_a3() { cout << " 1 2 3\n" "a x | x |...
[3 replies] Last: Thank you. No problem :) (God, I suck at programming.) Don't view... (by anonymous23323124)
Help -- what is wrong with this code?
 
#include<iostream> using namespace std; int main() { <------------- The error keeps popping up on this and the int main() int hours; int minute...
[9 replies] Last: Maybe and ONLY maybe there is some issues in make inside Window$? AF... (by eraggo)
please help me in this problem
 
it has gone wrong
[2 replies] Last: by the way what has gone wrong? (by Undeclared)
convert integer into proper decimal format
 
how can i convert integer such as 1000 into 1,000.00 or 3031 into 3,031.00? thanx.
[2 replies] Last: You can use this: add #include<iomanip> cout<<fixed<<showpoint<<setpr... (by Undeclared)
Hey it compiles but doesnt do what i want it do...can you help me out?
 
hey i have this program that adds and finds the square root it adds but it doent find the square root.Can you tell me why? #include "stdafx.h" #include <iost...
[3 replies] Last: original code compiles fine on my LINUX console AFTER removing line: ... (by eraggo)
cmd
 
I want to make a program in C++ that can perform cmd commands. For example I want to copy a file with the cmd command copy but under my c++ program. Thanks ...
[4 replies] Last: Thanks Intrexa for the help (by khaled124)
Random Integers and Decimals
 
Is it possible to get C++ to give me a random number that can either be an integer or a decimal. For instance: 12, 76.5, 50.2, 89, etc. Thanks
[8 replies] Last: Esanders323, consider this program it performs several calculations on... (by Mohammed Abdul)
September 2011 Pages: 1... 434445464748
  Archived months: [aug2011] [oct2011]

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