Beginners - July 2011 (Page 11)

How to error proof integers from characters?
 
I have this bit of code.. void fDisplayExplanation(){ cout << "This program asks the user to enter a loop count,\n" << "reads the loop count ...
[3 replies] Last: Not sure yet about what you are looking for but int isdigit ( int ... (by closed account N85iE3v7)
How do i return an array?
 
when i return the function i do not do it properly... compile it, and you will see what i mean! *n does not contain what *Final returned, and if it does it ...
[no replies]
operator= for matrix
 
Hello, I am trying to overload the operator= for matrices. I have an error when I run the code but cannot figure out what it is: *** glibc detected *** ./cla...
[2 replies] Last: I did and this is the line return containing return *this that is caus... (by marco84)
random number help
 
Hey guys! New programmer here, been teaching myself with a few different beginner/basic books. So this code/project is not for a grade nor will it be used for a...
[9 replies] Last: Called a reference operator - You know how you pass a number into your... (by vlad61)
Error: expected unqualified-id before...
 
#include <iostream> #include <cstdlib> #include <cstdio> using namespace std; int main(int nNumberofArgs, char* pszArgs ) { int guess; cout<<"type ...
[4 replies] Last: OOHHHHHHHHH i see thank you soooo much man!!!!!!!!!!! I got it (by Flargebla)
Help me out please
 
Hello I'm new to c++ and relatively new to programming i need to write a program that displays either a random number or a random letter here is my code #...
[2 replies] Last: as it turns out my problem was that instead of y==1 i wrote y=1 but th... (by patr1ot)
by gurps1
C++ game using DirectX
 
Hey guys & girls. I have been given the following task to be completed by August 5th of 2011. It is a part of my university course. I was given the task yest...
[6 replies] Last: [quote=shacktar]to answer the question "does sprite A collide with/tou... (by shacktar)
Characters and Integers and File I/O
 
Hi. I am writing a program which should take a number(integer, up to 5,6 digits) from a file and make calculations with it. But... I know that ultimately, eve...
[7 replies] Last: This is the complete code. I am sure it is not nearly the best code fo... (by ProbePLayer)
"Folding together functions" question
 
Hi, I am working out the book C++ Without Fear, and I am in ch 5, trying to understand a concept in example 5.5: optimizing the program. This is the code I had:...
[1 reply] : The first version of select_next_available executes a bit of code whi... (by hamsterman)
Countdown
 
Again for my Trivia, I'd like to create a countdown, so the player would have like 60 seconds to answer before the code continues... I tried this http://www.cp...
[13 replies] Last: Tried that..Isn't working...I am thinking about moving it to a gaming ... (by brreakerr)
a simple question
 
How does a derived class's member function get access to the protected data of the base class? I tried like this: #include<iostream.h> #include <conio.h> #i...
[3 replies] Last: Line 19 fails because you cannot access a protected member of another ... (by coder777)
Boolean matrix problems
 
Hello, I am having problems defining a Boolean matrix for a maze program I am writing. I am wondering what is wrong with my code. I am trying to receive values ...
[2 replies] Last: I guess this const bool walls = {true,true,true,true,true, ... is ... (by coder777)
Extending Classes: Overriding methods
 
I have two classes. class Account { protected: string* owner; int accNum; double value; double tax; doub...
[2 replies] Last: Will need to access your object through a pointer or reference too. (by closed account DSLq5Di1)
Constructor "styles"
 
Hello people. What's the difference between these two constructors? Which one should I use and for what benefit? Thanks. class B { public: int _a; ...
[3 replies] Last: http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.6 (by closed account DSLq5Di1)
error C4430: missing type specifier - int assumed
 
Can someone tell me why I am getting this error on line: : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int Line: ...
[1 reply] : Line 238 and 239 are not in the scope of any function. Try moving the... (by Warnis)
C++
 
hi im starting to do C++ for the first time and i would you to adivce me what to look forward for on the first chapter
[1 reply] : Structure of a program, variables and functions: how to take decisions... (by Catfish)
macro stringization merge
 
Hi! I have a problem with below code: #include <iostream> using namespace std; #define MISSION(x) "Apollo_" ## #x int main() { cout << ...
[2 replies] Last: It's work and I understood how work "##". Thank you for your help ;) (by djlinux)
Visual Studio problem
 
So I am working on a program for school and came across this problem. My Visual Studio is running code that I have deleted from the program but not the code tha...
[1 reply] : Check to see which project is currently active, I know I had the same ... (by toexii)
pthread communication overhead citation
 
Hi all, I was wondering if anyone knows the order of time required to communicate between threads through use of condition variables, semaphores or otherwise. ...
[no replies]
i changed the quastion to be more simple.
 
we got everything prepred and we just need to add main. whats worng with the main i wrote? main.cpp (i wrote) #include <iostream> using namespace std...
[15 replies] Last: You need to enclose the filename with quotation marks. For example: #... (by closed account zb0S216C)
July 2011 Pages: 1... 910111213... 54
  Archived months: [jun2011] [aug2011]

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