Beginners - March 2012 (Page 56)

by Ken777
A function to calculate the factorial value of any integer
 
#include <iostream> #include <ctime> #include <cmath> //int factoriel (int mynum) { // int factorial(int mynum); //int *array = new int ; ...
[5 replies] Last: #include <iostream> #include <cmath> using namespace std; int Factor... (by Ken777)
by Claymz
Methods outside Class's scope
 
Hi all, why are the bolded methods outside, and what effect has this approach? Also, why are operator+ and operator- methods followed by const and again, wh...
[3 replies] Last: Vec operator/(float b, const Vec2& a); It should be obvious that thi... (by ne555)
need a help in strings im hopeless
 
i need to write a c++ program that prompt the user to enter a sentence consist of three words using the function getline, then the program should print the thir...
[4 replies] Last: If you "know everything about it", then you should have no problem wit... (by packetpirate)
Simple Menu and Loop with functions
 
I am trying to display a menu using string Menu(), but I do not see the program at all when I run it. Can anyone tell me what I am doing wrong? #include <...
[4 replies] Last: I think that instead of using of string menu() it would be better to d... (by vlad from moscow)
Need some help
 
#include <iostream> using namespace std; int main () { char input; // menu input variable bool quit = false; // loop control variable ...
[no replies]
c++ won't compile
 
c++ won't compile it say errors and high lights #include <iostream>
[9 replies] Last: @Azagaros, are you asking me? I use gcc 4.7 but it doesn't really matt... (by Peter87)
Problem installing SFML(missing file?)
 
Ive spent an hour now wondering what is wrong with my installation of SFML. I followed the tutorial exactly but here is what i get: Code: #include <SFML/Syste...
[13 replies] Last: That was actually the thread I found to solve the issue. Did nothing f... (by ResidentBiscuit)
Help with Documentation translation
 
Hi, I was just trying to understand the dereference operator portion of http://www.cplusplus.com/doc/tutorial/pointers/ and was wondering if translating it to t...
[1 reply] : De-referencing is simple to understand: When you de-reference a point... (by closed account zb0S216C)
Integer types and overflow
 
Hello! I'm very much a beginner at programming. I'm teaching myself by trial-and-error whilst my partner is taking a basic C++ class at Uni. He wrote most of...
[5 replies] Last: The second option sounds like a lot of things I've read about. The on... (by nullcoding)
Templates
 
I want to create a small library for matrices. But I want to be fast: (no OpenMP/OpenCL) - After testing 'virtual getValue' is 5 times slower from inline. - v...
[1 reply] : Have a look at: http://en.wikipedia.org/wiki/Template_metaprogramming#... (by LB)
by dango1
ctrl + F5 doesn't work
 
I want to compile without debugging and using ctrl + f5 combination. However, even though with that combination program shouldn't be terminated when it reaches ...
[1 reply] : um, which development environment are you using? If you read the firs... (by Azagaros)
Converting from a typedef to a struct
 
I was recently given the task in my class to change a bit of code(included below) from a typedef to a struct. My teacher did not really go over this process in ...
[11 replies] Last: Crap. Thank you for that. I just realized that I had it written correc... (by cdseasholtz)
Help with vector<object>...
 
I'm getting confused with making vector functions work when using a vector of objects. push_back(); is not a member function of TheObject, so when I try to do...
[8 replies] Last: a deque is a good choice if you don't care about the underlying arrang... (by Bench82)
Initialize array in a class
 
Hi people i have a little conceptual problem here class Polymer { public: Conformation(int N); Conformation(char *filename); virtual ~Conform...
[1 reply] : Conformation( ) ? What's that? They aren't constructors. Simple ans... (by closed account zb0S216C)
help with homework assignment
 
I need to write a program to read an integer number and find its number of digits. Example 3425 has 4 digits and 485567 has 6 digits. The program should b...
[14 replies] Last: I see. Thanks for the explanation . I didn’t know that there was ... (by agent99s)
by hannah
C++ Darts Simulation help!
 
Hello, My name is Hannah. I am currently studying game design and am in the middle of being taught C++. We've asked for our first assignment to write da...
[4 replies] Last: Why is using functions "c style"? Do we not use functions in c++...? (by ResidentBiscuit)
using operator overloading
 
hey every one, i have a class and it has a private member (Pixel) of structure type. the structure has 3 integer variables. basically im trying to make an cla...
[1 reply] : Usually, it's good practice to only overload bitwise assignment operat... (by closed account zb0S216C)
Help with displaying text after cin
 
Hello, I'm trying to figure out what library/class I would use to display text after the cursor Example Header Goes here 1. Do this 2. Do that Please...
[6 replies] Last: Ill check it out, thank you (by Jesus805)
Loading libraries problem in vs2010
 
Hi I am using opencv2.31 the latest available. For Tbb I downladed the latest Tbb from net. I am using Vs2010 Ultimate. Now I have gone through the youtube vi...
[1 reply] : Can u provide the code here? (by atjm88)
Switch help
 
Hi i want to make a switch witch have a letter instead of numbers like Switch(adasd) case y: case n: is it possible
[3 replies] Last: So long as the case label evaluates to an integral type, it should be ... (by closed account zb0S216C)
March 2012 Pages: 1... 5455565758... 71
  Archived months: [feb2012] [apr2012]

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