Beginners - May 2010

by chiara
Pointer or reference?
 
Hi all, in an existing code I found this notation: PINK* boon = static_cast<PINK*>(car.get()); where car is a shared pointer to a container and PINK ...
[5 replies] Last: void func(double d); int main() { PINK* boon = new PINK;... (by Galik)
by chiara
Function parameters
 
Hello all, I am a relatively new c++ user. I would have a question about functions. I want to define a function which accepts a number of parameters, say de...
[4 replies] Last: Real is just a typedef for float. What I propose is already a functio... (by Athar)
What kind of argument does this function take?
 
Hi I have a function that I don't really know what kind of argument it takes. The function looks like this: void printText( const string& stringPtr) { ...
[2 replies] Last: Thanks that cleared things up a bit. I thought there was something str... (by SirSkorpan)
by wasing
Changable filename based on user input
 
Good Morning small question and thanks for your time im trying to write a portion of this program so that the user can input the name of a specific goa...
[6 replies] Last: hey thanks albatross i was wondering that earlier thanks for all yo... (by wasing)
declaring floating-point type variables
 
I am learning C++ through the book C++ Primer Plus (5th edition) . I'm at the part where you are learning the different types of variables and constants, and e...
[7 replies] Last: I read your guys' replies and the section about constants in the tutor... (by Kieth89)
by declan
Graphics in C++?
 
Hi everyone! I have a program that runs a simulation, and leaves me with some data. Now I want to view that data graphically, by producing a flowfield. This ...
[8 replies] Last: What Galik suggested seems cool, but a quick look at the description a... (by declan)
Is there a command to place variables in order?
 
Is there a command to place variables in order? I mean like this: #include <iostream> #include <string> using namespace std; string ploeg_1; //namen...
[3 replies] Last: BTW, will it order the FULL sentences? (by xander333)
Returning pointer to malloc'd area
 
I'm confused about the pointer to a malloc'd area. I have something similar to this: char* called_function() { char *p; p=(char*)malloc(32); retu...
[1 reply] : "Doesn't work" is not an error description. The code is correct, exce... (by Athar)
char arrays and ternary operators in C
 
is it possible to change the value held by a char array using the ternary operator? This is what i have tried, but the output is not what im expecting: ...
[2 replies] Last: Duoas, thanks, i can remember seeingsomething about having to acces... (by dave0504)
Calculator problem
 
Hello, I'm new to C++ and I'm stuck with a question. after reading the first 45 pages of this sites tutorial, i tried to make a calculator. I'm heppy with th...
[7 replies] Last: Thanks so much guys! This is an awesome community :D (by xander333)
by kaotic
First project
 
Hi all, I am new to programming and C++. I need to make an assignment for school about numerical ways to calculate pH values of acid-base titrations. i g...
[6 replies] Last: Allright guys it seems that using the vector instead of the array solv... (by kaotic)
by ETep
Dynamic Memory Question
 
Looking at this example code, can someone tell me what the difference is if we eliminated the pointer *p and after the line "cin>>i" simply replaced "p=new..." ...
[10 replies] Last: I'd still like to know why Dev is letting it compile and run. Beca... (by Athar)
The most strange thing i have ever met : just change a name, everything fails!
 
I wrote a template function to resemble the find generic algorithm, of course ,it's a very simple function , it is: #include<iostream> #include<vector> using ...
[4 replies] Last: Yeah, I changed the function so as to match what hamsterman suggested,... (by akilguo)
by kulfi
bitwise shift operation
 
hi, I want to know why and where we use this operation. thanks
[11 replies] Last: [quote=Albatross]Example B... well... admittedly I did not consider th... (by m4ster r0shi)
by TH 113
"Spliting" data into two variables
 
#include <iostream> using namespace std; int value, x, y; int main() { cout << "Enter a 32bit value: "; cin >> value; } Now I want to move the fir...
[3 replies] Last: @crazzyguy101 I think he is talking about the hex values. Oh is t... (by crazzyguy101)
How do I extract data?
 
Assume that I have a user input some data, a really good example would be from a text-based RPG that I play- Ex: Speed: 2,779,082.2947 Strength: 52,309,610...
[5 replies] Last: This is just an example too...I'm just wondering how you would get ... (by crazzyguy101)
Using pow with arrays
 
I just completed my first semester of c++ class, and I'm going back and redoing my midterm for shits and giggles (can't sleep). Well, I'm a bit stuck. The mi...
[3 replies] Last: For anyone interested, this is the entire code (I had the lamest midte... (by numblocke)
Double circle
 
Hi there, I Was reading some codes of C++, there something called a circle, double circle. I Don't understand what it's for, I couldnt find it on the search....
[4 replies] Last: [quote= AngelHoof]The formula you see there, circle = 2 * PI * r; Is t... (by crazzyguy101)
WebKit
 
Anyone done a C++ project using WebKit and know how to integrate them in Visual Studio C++, Windows Visual Form?
[no replies]
Reading different # of inputs in each line of the same file
 
Hello all, I'm back with yet another nooblett question. How do read varying size lines from input. for example i have 2 int and 1 string on 1 line, on nex...
[4 replies] Last: solved it, thanks for everyones help (by thewonderdude)
May 2010 Pages: 123... 33
  Archived months: [apr2010] [jun2010]

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