Beginners - September 2013 (Page 39)

Getting wrong answer for factorial 15!
 
I'm very new to C++, just started my class actually. I was tasked with solving the factorial 15! both directly and with Stirling's formula. I can do the formula...
[7 replies] Last: I guess they are all float and not int. Not quite. 3.0 is of type... (by Chervil)
Colored text in graphics?
 
Hey! I needed to know if there is any possible way to make a colorful text in graphics mode Like each letter will have different colors Try using setco...
[1 reply] : I'm not sure what you are asking. setcolor() is, I believe, the corr... (by Duthomhas)
is it possible to write from a functio to a file
 
I got this piece of code and I've been trying to take the result of this function and write to a file but everything I tried is just a failure. Is it possible t...
[2 replies] Last: > how to write and read from a file #include <iostream> #include <fs... (by JLBorges)
What’s wrong with the following code?
 
I have stumbled upon an exercise on Michael Dawson's book: Beginning C++ Game Programming. It asks to find what is wrong with the following code. I think it is ...
[3 replies] Last: i got it now, thanks everybody!! Cheers!! (by minuss273)
Quick question with #define
 
Will this expand properly? Inside random header: #pragma once #include <Version.h> #define THISVERSION 001 namespace SBV{ //Codey stuffs here } Insid...
[4 replies] Last: Wow... I have no words! (by TheBeardedQuack)
there is some problm with this program.please tell me.
 
print an N*N matrix in tabular form. # include<iostream> # include<conio.h> using namespace std; void printarray(int arg ,int length){ for (int n=0...
[1 reply] : You have a couple of problems. 1) Line 18, your array is uninitializ... (by AbstractionAnon)
Inheritance, const& member
 
Is it possible to make a class which is a child of a class with a const& member? In other words, how to make the code (see below) working? #include <vecto...
[6 replies] Last: > but there is no constructor Container A(B const&) The one that's c... (by ne555)
Problem writing data to csv file
 
Hey guys, first, sorry for my bad english. Im from germany but i read a few posts here and think the help for others was very good. :D Me and my friends want t...
[no replies]
Array Question
 
I need to create a method (constructor) to initialize a bigint to an int value you provide [0, maxint]. Example: bigint(128). Here is my class: #ifndef ...
[4 replies] Last: Peruse Daleth's post. (by Josue Molina)
Playing around with making calculators and running into a problem with PI
 
Im making a volume calculator and im running into a problem, for some reason no matter what i do the final answer is always "3141.59" so basiclly PI with the de...
[4 replies] Last: thank you very much!... haha, I feel kinda stupid. (by pmiccich)
by hah49
reading a file
 
hey guys .. I was trying to read a file using the end of file (eof) statement .. however when the file is finished it didn't stop ! it is reading the last...
[4 replies] Last: oh ok i can see now your point .. thanks alot for your time :) (by hah49)
which file to use to save a path to database
 
Hi. Need your advice. The application I am working on will be cross-platform (at least Windows and OSX). I need to create a file that will keep the path to a da...
[no replies]
strange 400
 
why do i get 400 after inversion of tens number int main() { int number; cout<<"Enter number\n"; cin>>number; if(number<100) { int numb...
[2 replies] Last: thank you but i was just curious why the number 400 could you explain ... (by Sharan123)
by Ltp
Help me to fix a silly problem in stack
 
I am almost done with the following code; need a single argument to find the desired output. #include <iostream> #include <ctime> using namespace std; ...
[1 reply] : Better, why use this function when you can create a new stack frame us... (by Zin Byte)
Question about if statements
 
Is there a way to simplify if (n=='y' || n=='j'|| n=='d') without writing a function that returns a boolean?
[2 replies] Last: > without writing a function Use a function that is already written ... (by JLBorges)
plz help me.
 
how to initilize (N*N) matrix with random number in the range 1-9.plz help me. is this true? const int n=20; using namespace std; void initilization (int ar...
[3 replies] Last: At line 18, you're declaring the array as 3x5 (15 elements). At line... (by AbstractionAnon)
by darqan
Search function help
 
Hello folks! I have been struggling with this problem since daaays back and can't find a solution to it so I hope somebody could bring some light to my novice ...
[4 replies] Last: 1) At line 13, you're copying the pointer. Not the name. 2) At l... (by AbstractionAnon)
This is just wrong!
 
Whenever I try to print out my linked list after generating a bunch of random values, it never displays right. It only shows 1 or 2 values in the list, when it ...
[no replies]
Could some please tell me what this code does?[solved]
 
Hello everyone I am reading Bjarne Stroustrups new book and i am having a hard time figuring out what this code does.The problem I have with it is 'while(n--)' ...
[2 replies] Last: Thank you. (by otisphat80)
while(cin)
 
Hello, I have a question regarding a loop I don't fully understand. Here's the problem: We are writing a calculator, and we wan't him to not only understa...
[2 replies] Last: I guess that makes sense. Thanks a lot! (by Fauch911)
September 2013 Pages: 1... 3738394041... 64
  Archived months: [aug2013] [oct2013]

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