Beginners - January 2011 (Page 22)

Large numbers - which type should I choose ?
 
Hi there, I've a question regarding large numbers. My program needs to read max 10^20-digit number and I'm wondering which type is best for this. I tried ...
[6 replies] Last: Unsigned long long sounds fine then :) I'll use it, and write my own s... (by john891)
what does this code do??
 
template <class x> void destroy(x* a) { a->~x(); } int main () { int x=5; destroy(&x); cout<<x; //d.foo(); cin>>z; } i thought that the...
[6 replies] Last: The destructor for int does not modify the memory locations that the i... (by jsmith)
Drawing Graphical Images
 
Can someone direct me or explain to how to draw graphical images in C++? Just a simple stick figure.
[14 replies] Last: actually, that calls shap_ccc.h which does have a cpp, so you'll need ... (by cran)
Noob question about pointers and arrays.
 
So I'm originally a python guy and had to switch over to C++ for a project, I used to know C++ somewhat before(long time ago) and am getting back into it. Anyw...
[3 replies] Last: This: b is interpreted identically to *(b+0) which yo... (by Moschops)
char **b=new *char[5];
 
the compiler gives an error with that.. how can i define a table that has pointers of char??
[1 reply] : I'm thinking the '*' goes on the other side of the char if you are cre... (by cran)
by jasmin
what does this error means?
 
i have an er here : warning: no newline at end of file what should i do whit it? where did i go wrong? here is the hole program: #include <iostream> #inclu...
[4 replies] Last: thank you so much! its working now :) (by jasmin)
How to Display C++ output as Page wise
 
Hi Expertz; I am displaying a line by n number of times using loop. So if the number of lines exceeds the size of the screen then How can i make it display ...
[1 reply] : depends on how you are outputting... are you doing something like: ... (by cran)
What's the difference between C# OVER C++?
 
I've been writing programs from quite a while now, just recently I began learning game programming with a few buddies. I'm looking forward to start XNA, which u...
[1 reply] : Take a look at this http://www.thinkingparallel.com/2007/03/06/c-vs-c-... (by Return 0)
Modulus operator with array
 
So I just completed the first part of my assignment via someone elses thread so I figured its actually time for me to put a thread in the correct forum. I have ...
[2 replies] Last: pletter2 doesn't have a null char to stop it... you'd be better doing ... (by cran)
Fraction Program...too many functions?
 
Hi all. I have been working on a program to add fractions. I want to eventually +, -, *, and / fractions. When I run it all I can do is enter two fractions and ...
[8 replies] Last: How I handled add(): void simplify_fraction(int &num, int &denom) {... (by wolfgang)
Can any experts let me know where i go wrong in here ? (1,2)
 
#include<iostream> #include <vector> // vector Library #include <string> #include<fstream> // file stream L...
[36 replies] Last: http://www.cplusplus.com/reference/iostream/istream/get/ that is th... (by cran)
Concatenate char to char*
 
I am trying to concatenate a char to the end of a char*. I have a char* result that i want to add a character to the end of it. I'm not sure if I can do this wi...
[11 replies] Last: you probably should take things out of global scope ... plus if you wa... (by cran)
Randoming and other basic info
 
Hey, I am a complete newbie to C++, and i was looking through your tutorial, and its amazing, but when i got to the arrays part it still left me wondering: 1. ...
[4 replies] Last: hey so i found that because when i base a random number on the ti... (by Lucas Simpson)
problem with a code. (1,2)
 
class include_function { // new class called include function public: long datetoday (string date) { string da...
[20 replies] Last: im gona open another topic for the whole code (by asibuan)
by cstorm
Interested in System()
 
Since starting c++ programming 4 months ago in my highschool class, When I learned system commands, I thought "wow these are helpful, (for ex, system("cls"), sy...
[10 replies] Last: http://www.cplusplus.com/forum/beginner/1988/page2.html#msg10636 http... (by Duthomhas)
My command prompt will not stay open (1,2)
 
Here is the code: #include <iostream> using namespace std; int main() { int iPlayers; int iHours; int iPoints; int iGames; int i...
[34 replies] Last: lol, I was having fun with the first part, hence the ;p .. but dividi... (by cran)
memory leak
 
Hey guys, I'm trying to understand memory leaks better. Specifically, a program (numerical simulation) seems to have a small memory leak despite me avoiding ...
[9 replies] Last: they are actually handy when you have no other choice, but there is no... (by cran)
by plokij
converting simple Python code to C...
 
Hi, I am having a bit of trouble converting a simple Python code for computing factorials into the C language. Python Code: import sys def fac(n): f=1 ...
[11 replies] Last: Undefined reference errors generally mean that the linker cannot find ... (by Moschops)
by acorn
parsing main
 
giving the function main int main(int argc, char* argv ) { } can someone show me how to parse commands passed through main. also how do i test it ? ...
[14 replies] Last: ok that was the problem thanks guys. i learned tons with this exercis... (by acorn)
Class object member of another class
 
I have a fairly simple class, and I want objects of another class to be private members of that class, and objects of that class are initialized with a value th...
[7 replies] Last: So I just put objectA, objectB etc. in the MyClass private members' pa... (by Metallon)
January 2011 Pages: 1... 2021222324... 42
  Archived months: [dec2010] [feb2011]

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