Beginners - January 2013 (Page 51)

Finding prime factors of individual numbers
 
I'm trying to display the prime factors of each number between 1 and 100. I can find the prime factors of individual numbers, but when I try to do the same with...
[5 replies] Last: /* PRIME FACTORIZATION PROGRAM *//* 60 = 2 * 2 * 3 * 5 */ #include <... (by closed account 18hRX9L8)
by Kovs95
Fun with Functions part 3
 
Write a function titled say_hello() that outputs to the screen "Hello" ★ Modify the function so that it takes an integer argument and says hello a number o...
[6 replies] Last: Nevermind about those questions! thanks to all who helped! You all wer... (by Kovs95)
by Thaity
Error Message
 
Hi Guys. I'm doing an assignment for uni, and I'm getting a message I don't understand. I've researched other examples, and I don't see a difference, perhaps so...
[5 replies] Last: Thank-you once again, all input is greatly appreciated. (by Thaity)
help
 
Hi Friends, I am trying to convert a number to its binary form. I have done till here #include<iostream.h> #include<conio.h> void main() { clrscr(); i...
[1 reply] : Please use code tags First of all, 'c' is uninitialized, and you're n... (by maeriden)
Array..tallying numbers
 
so i have an array of 300 numbers. lets say like Tally ; i need to write a code which checks if any of the numbers of the arrays repeat it self and how many ...
[3 replies] Last: /* code by usandfriends */ #include <iostream> #define RESET 0 main... (by closed account 18hRX9L8)
function pointer declaration syntax
 
I've seen these two: void (*foo)(int); and void (*foo)(int x); Which is correct? Why use one over the other?
[3 replies] Last: I like using one of these: typedef void function_type(int) ; functio... (by JLBorges)
by Pwego
Getting white screen, not working
 
With knowledge from you guys about while and if statements i cleaned up my code to this. while (start < 2){ if (stage1 = true){ Drawitem(itemx,item...
[3 replies] Last: You are not changing 'start' anywhere in that loop. So once the loop ... (by Disch)
by Pwego
Why does this not work!?!?
 
Ok I have a working code which is : //stage 1 (first box) if (!isitem&&!p1&&!p3){ Drawitem(itemx,itemy,0,255,0 );} if (facex-5 <= itemx+5 && facex+...
[no replies]
by Pwego
Having noob problems
 
I have some issues just making a line go up and down on the screen. Instead of keep posting here which i think i might annoy someone. My skype is chrisgotpropz ...
[1 reply] : On the contrary, this is a HELP FORUM. You post your problems here and... (by Hotice)
by Pwego
This If and While loop issue
 
I am still really new to c++ and I want to know about these loops so i was experimenting and I saw something pretty different here. Why does 1 generate two do...
[4 replies] Last: You could even have in an if-statement a condition that contradicts th... (by Hotice)
Why is my operator erring?
 
I am teaching myself how to overload operators in C++. I have tried the following. #include <cmath> #include <iostream> using namespace std; #define ...
[4 replies] Last: Also, macros are generally dangerous to use, as they don't perform any... (by Hotice)
need 25 programs
 
I need to take printouts of 25 programs made by me on arrays and loops.Can anybody help me by suggesting some.....
[4 replies] Last: Actually try a few of these. They are usually simple programs that wo... (by Stewbond)
Why is the superclass's default constructor being called?
 
I am teaching myself the basics of inheritance with the code snippet below. #include <iostream> using namespace std; class Polygon { protected: int x;...
[1 reply] : In the constructor of a derived class you should call the constructor ... (by Fransje)
Operator Overloading with Templates
 
Hi! I'm trying to overload << operator and running into an error that says function template partial specialization is not allowed. I really don't understand w...
[5 replies] Last: Tried with a forward declaration and still ran into errors. Then tried... (by noisycoder)
by tdk93
fatal error, while input array of char*
 
this is the code---------- int main() { int noOfChefs, noOfEmails; cin >> noOfChefs >> noOfEmails; char* chefWithCountry[ 100 ] = {"dsa", "...
[2 replies] Last: You have an array of pointers to char, but they are not properly initi... (by Chervil)
by Marcan
For loop increment condition?
 
Hi everyone, I just stumbled upon the solution to this exercise here: http://en.wikibooks.org/wiki/C%2B%2B_Programming/Exercises/Iterations#EXERCISE_2 ...
[2 replies] Last: Thank you. I really couldn't wrap my head around this one, now it mak... (by Marcan)
How to Draw a diamond and Rectangular hollow in c++
 
How to Draw a diamond and Rectangular hollow in c++
[1 reply] : Honestly just stop... (by opiop65)
by jCha
Pyramid Calculations
 
Hi, i'm trying to make a program that does the required calculations to show the following: 9*9+7=88 98*9+6=888 987*9+5=8888 ...
[4 replies] Last: i have found it too ^^ int i=0, k=8, j=0, F=9, R=0; for (i=8;i>=1;i... (by jCha)
help
 
hi friends , I have to put the output of a loop into an array.How do I put it???
[11 replies] Last: I only guided you... Hopefully you learned something and can see the o... (by Moooce)
error: expected unqualified id before '[' token
 
Can someone figure out what the problem is? It is on line 32. #include <iostream> #include <vector> #include <cmath> #include <math.h> #include <lim...
[2 replies] Last: Thanks so much. Although the program is not producing an answer. This ... (by eagleman)
January 2013 Pages: 1... 49505152
  Archived months: [dec2012] [feb2013]

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