Beginners - July 2010 (Page 21)

pass by reference and pointers
 
Lets say I have a function foo(bar &t) { //code } and in main I have main() { bar *t; ...
[5 replies] Last: Ok, thank you. (by smilodon)
Adding two polynomials with vector of structs
 
I am having problems primarily with the sorting function. What I need is for the polynomials after ...
[1 reply] : Since I don't have the patience to read through 148 lines of code: ... (by smilodon)
The Ampersand and other reference/pointer stuff
 
I began learning c++ about two weeks ago with the online tutorial on cplusplus.com, which seems o...
[10 replies] Last: Yes, a reference must be initialized when declared in a local variable... (by Duthomhas)
Question on declaring members in classes
 
I'm having trouble understanding the rules on declaring members in classes. I have initialised...
[6 replies] Last: Your welcome. (by smilodon)
Preventing duplication in 'Game Archiver' using iterators and vectors
 
Hello, I am working out of Dawson's 'Beginning C++ through game programming' and am working on an as...
[8 replies] Last: Thanks for all the support and help everyone, I finally got it to run ... (by Futureboy)
CopyFile ?
 
This doesn't work: if I get last error I get error 3. Yes The file exists and yes I have access to...
[5 replies] Last: Thanks for the help, but I don't know what a POSIX i'm just running o... (by cabledevin)
how to insert an image?
 
when we make a simple program, the background is always black. how we insert an image or picture as...
[3 replies] Last: You can draw stuff in the Windows Console ... Here's a snippet p... (by Duthomhas)
passing pointer of array containing data type double
 
Hi I want to write a function which takes as input an array of INTEGERS and return another array ...
[1 reply] : double *array = new int ; Here's the problem. If you use doubles use... (by hamsterman)
Generating random numbers between two numbers
 
I have started this program which is supposed to generate 10 random numbers between 1 and 100 (inclu...
[4 replies] Last: while (rand() % 100 +1); This line checks the condition for true ... (by AngelHoof)
Function in a Class Declaring Another?
 
Hey, I just started C++, but my book doesn't cover classes very thoroughly (yep). I want to have...
[6 replies] Last: Ah. Excellent, thank you =) (by suffusion)
Arrays of Pointers
 
#include<iostream> using namespace std; const int size = 3; class AAAA { private: ...
[3 replies] Last: Although this is irrelevant to what the OP asked, I'll play along. ... (by m4ster r0shi)
pointers and dynamic memory allocation
 
Hello all, I have a question about dynamic memory allocation (if I'm in the wrong forum please let m...
[7 replies] Last: I gather that you didn't read the whole topic. Because if you did, you... (by m4ster r0shi)
question loops
 
i need to use a loop but i am not sure exactly how. here is the senerio. i give a clue and the us...
[3 replies] Last: First make an 2 dimensional array of chars and write in your hints. ... (by jackabascal)
Rotating a lineshape in visual c++ (1,2)
 
Hey all! I found something interesting i would like to do, but i cant seem to figure out how to do ...
[24 replies] Last: If the shape occupies that region, it's center should be at (310,310) ... (by Bazzy)
Not allow user to input string
 
Hi! Can you show me an example of code that doesn't allow user to input string or char when progr...
[3 replies] Last: thanks a lot Bazzy. I didn't notice your reply. Thanks a lot anyway. (by aladar04)
Insertion-Sort Progress Bar
 
Hi people! I make my own insertion-sort algorithm and I put a progress bar to print in the screen...
[4 replies] Last: Exactly what I was looking for! Thank you! (by brazyuri86)
vector words compare
 
Hello, i don't understand 1 little thing: if (words[i-1]!=words ) // is this a new word? Th...
[4 replies] Last: If the vector is sorted then identical words will be adjacent. (by Galik)
by xyzt
is std::cout thread safe?
 
std::cout object is defined as: [Stroustrup says in his book] namespace std { class ostream { ...
[1 reply] : Yes, however if you run this in two different threads: cout << "He... (by Athar)
Array of strings to store data...
 
Good evening! I am working on a problem where I need to use an array of strings to store email ad...
[7 replies] Last: I really think you should avoid using recursion like that (calling pro... (by Galik)
newbie
 
I have been given the task to try and understand a C++ program written by someone else....actually m...
[3 replies] Last: Say you have an object foo, and its type has a member named bar. You w... (by filipe)
July 2010 Pages: 1... 1920212223... 31
  Archived months: [jun2010] [aug2010]

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