Beginners - September 2010 (Page 8)

Preventing number repeats in a randomized function
 
i am creating a shuffling system for a card game i am making for school. i have used _card = rand() % 51; seeing as the first card registers to 00 and th...
[12 replies] Last: Disch is correct. Modulo works by diving dividing the left operand b... (by closed account Lv0f92yv)
visual studio 2010 questionsssssssss
 
Hi all..it's me =) Help me please... This code can be build and run in codeblocks.. But when i went to VS2010, no matter how i try, it is not working. Ca...
[3 replies] Last: #include "StdAfx.h" That's the giveaway right there. ;) (by LB)
done
 
cout << "This question is done"; Thank you all for the help
[15 replies] Last: Everything you want to do here will need the loop. Matrix::Matrix() {... (by LB)
SDL window acting weird with diffrent DrawLine & FillTriangle algorithms
 
Hey, So here it goes; I am currently studying computer science and i finishing the required algorithms to draw lines to form triangles, calculate bounding b...
[no replies]
static_cast<char>(variable) question
 
I have a problem which is directing to me to write a program that prompts the user to input an integer from 0-35. If the int is <= 9 it simply outputs the in...
[2 replies] Last: thanks a lot, that did solve my problem. I appreciate your help. (by Matorian)
by Eyecon
beginner c++ problem..
 
Something not right with the results this program gives whats wrong? #include <iostream> #include <cmath> #include <fstream> int main() { usin...
[11 replies] Last: http://cplusplus.com/doc/tutorial/functions/ ^This should help you un... (by Albatross)
c++ replace function
 
Hi! I’m new here. I’m need in c++ a string functions. That is one textbox to any textbiox transfer all character. But that is replaced. Example textbox1 tex...
[1 reply] : Look up the std::transform() algorithm and start there. (by jsmith)
covert structure object in to class object
 
hi.. how to covert structure object in to class object. explain with example. thank you
[3 replies] Last: There is no conceptual difference between classes and structures, they... (by Athar)
by BTD
Need assistance with a project
 
Hello I am new to C++ I am learning it from various sites and today I started my fist project and I need a tip. First I need a way to check if someone has in...
[3 replies] Last: Thank you (by BTD)
by cdummy
source not working
 
Hi I am very new and when I strat to compile the examples in SOURCE CODE section here, it doesnt work! Why? I am using DevC++ compiler. Thank
[2 replies] Last: Some code examples in the sourcecode section use pre-ISO C++ (by Bazzy)
by Kanj
Trouble with linked list implementation of queue.
 
Why doesn't this program run? I suspect something is wrong with the underlined part. #include<iostream.h> #include<conio.h> struct node{char c; node* nxt...
[3 replies] Last: Thanks a lot ne555. I got it. (by Kanj)
Iterate through a vector and delete elements?
 
So, I'm trying the bunny game exercise from http://www.cplusplus.com/forum/articles/12974/. I'm trying to iterate through all the bunnies in existence and th...
[6 replies] Last: Oh and also line 17 invalidates your iterator by adding more bunnies t... (by Galik)
How to calculate time complexity
 
Hi, I have a doubt to calculate time complexity for while loop. For example: int n=5; int count=0; while(k<=n){ k=k*2; } cout<<count<<endl; So he...
[3 replies] Last: Actually it should be like this, because it's look like sense. int... (by krishan22)
by Zhuge
sscanf troubles
 
Might be that eye, at, and up are pointers, so you might need to do something like &((*eye) ).
[6 replies] Last: Okay, that didn't solve it. I substituted the %1f 's in my original... (by wasabi)
Trouble passing values to function.
 
Hey what's up, pretty simple question I think, i'll post my code after I post my error. Error : 12 :too few arguments to function `double mult(double, doub...
[5 replies] Last: it's quite possible that I didn't, i was scrambling between variations... (by georgewashere)
New to C++
 
No doubt this question is going to elementary but I'm just starting to learn the language, but for a class I'm supposed to design a program that "computes t...
[3 replies] Last: So the code is compiled and you can debug it, but you can't start with... (by AdventWolf)
std::vector<char> not working
 
I am using Visual C++ 2008 and when I use this code inside main() std::vector<char>c1; I get the following errors error C2039: 'vector' : is no...
[2 replies] Last: okay thanks for the reply (by alMarshy)
Enter the user’s input into separate variables using cin
 
I have to write a program that prompts the user for their first name, then prompts the user for their last name, and then returns a greeting. What is your fi...
[7 replies] Last: That's very kind of you, thanks for the nice explanation. I understand... (by schneider)
by okason
My Array is Not Incrementing
 
Hello all, long story short, the function below is not incrementing my array, please advise whats wrong with it //-------------------------------------------...
[2 replies] Last: Possibilities (if Plates is vector<long>): 1. you want Plates.size() ... (by kfmfe04)
Compile error : Class X has no member Y
 
Hello , when I try to compile my code , I get the error above. -----test.h----- public: int getAge(); -----test.cpp----- int Person::getAge(){...
[2 replies] Last: Ok Person.h #include <iostream> #include <string> using names... (by SneakSz)
September 2010 Pages: 1... 678910... 32
  Archived months: [aug2010] [oct2010]

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