General C++ Programming - October 2013 (Page 28)

Why vptr is not static
 
So, even though the virtual pointer is constant across objects of class why cant it be made as static. Why each derived instance is having the pointer to vtable...
[4 replies] Last: Thank you all for your nice explanation. (by kulkarnisr)
What am I doing wrong? it says operand types are incompatible
 
#include <iostream> #include <cmath> #include <iomanip> using namespace std; int main() { double temp, result; char type; cout << "Please enter...
[2 replies] Last: holy moley, thanks! that made the difference. :] sorry im a rookie pro... (by Yifan Shen)
by x00000
pointer and timestamps
 
does a pointer keep track of time stamps when it is created? i am trying to use it to create a table that can store the access count and the temporal locality...
[5 replies] Last: "Pointer" is not the answer, "class" is. Class encapsulates some data... (by keskiverto)
by x00000
using pointers for temporal locality
 
what does vector of pointers means
[1 reply] : std::vector is a container type that stores data objects in continuous... (by keskiverto)
URGENT!! background color in c++ using <conio.h>
 
Hi! How am I supposed to change the entire color of the background? When I do like this: int main() { clrscr(); textbackground(BLUE); cpri...
[8 replies] Last: [quote=DTSCode]I apologize... it was late Ah, I understand that very ... (by Duthomhas)
by Colaa
C++ Check program
 
So I have to write a program that outputs a check with correct spacing and everything, and this is the assignment. I seem to be stuck and unsure what exactly I...
[3 replies] Last: Well, without you telling us what the errors are, we're very unlikely ... (by MikeyBoy)
wide char enumeration (wchar_t)
 
i have been working a cipher for about a year, every now and then... what i need is to be able to point to the case of a wide char so i can do argumentation an...
[4 replies] Last: I don't understand what you're trying to do. "hex" is just a way to d... (by Disch)
Problem in reading stream value from a file
 
#include<fstream.h> #include<conio.h> #include<string> class CLS { public : string name; }c; void main() { fstream f; f.open("D:\\Text.t...
[7 replies] Last: > I know about the conversions by subtracting 48..... but that works ... (by JLBorges)
C++ code explanation
 
//Writing Custom File Structures #include <iostream> #include <fstream> using namespace std; int main() { ofstream Traits("Players.txt"); cout <<...
[3 replies] Last: I'm sure even the most rudimentary of C++ tutorial sources will explai... (by MikeyBoy)
Effects of VGA "Address wrap" and "MAP13"&"MAP14" bits (CRTC Mode control register)?
 
Anyone knows what effects they're supposed to have on calculated addresses in linear VRAM (In my system it's address before the is ( (VRAMStart(The start add...
[no replies]
?????????
 
what do you mean by fout.write((char *)&sal, sizeof(sal)); what did "sal" role right after class Salary? What does the above code do? ofstream fout;...
[3 replies] Last: Sure it is a good way! Unless there's a specific reason to save your ... (by kbw)
C++ code
 
/Writing Custom File Structures #include <iostream> #include <fstream> using namespace std; int main() { ofstream Traits("Players.txt"); cout << "ENT...
[1 reply] : Look at the return type of the >> operator. It is a reference to istr... (by keskiverto)
How does this work?
 
Structure struct free_throws { std::string name; int made; int attempts; float percent; }; Function definition free_throws & accumulate(free_throw...
[1 reply] : accumulate return a value, in this case: free_throws & so if ther... (by tath)
2d Game building (1,2)
 
Hello All, I just started learning c++ and was wondering what were the lessons that I would have to learn to be able to build a very basic game. So far, I ha...
[21 replies] Last: Thanks for all the information guys. I have just started my chapter on... (by joeyeld7)
cURL and c_str() wierdness
 
Hello all, please help out a Biologist: I am trying to parse the following URL using the cURL library: www.ncbi.nlm.nih.gov/nucleotide/? term = Anthoxanth...
[13 replies] Last: So this is just a case of "you can't get there from here"? Seems tha... (by norm b)
Random numbers
 
Hi, i just created an object who store a vector of size 7 with random numbers between 1 and 36. If i declare two objects i get different vector, but running ...
[7 replies] Last: Using 0 or NULL in place of nullptr is deprecated .... (by LB)
returning multiple values
 
in a function how do you return multiple values to the main function.
[4 replies] Last: thank you (by Cronnoc)
by erikva
Creating a basic Inventory Question
 
Hey everyone out there, Ive been reading several posts and part of this page for about a month now, and I created this account in order to find some help. I am...
[no replies]
by tegi00
Receiving a pointer allocation error in my code. Any ideas?
 
solved
[1 reply] : http://www.cplusplus.com/forum/general/112111/ (by ne555)
Pathing for reading a text file
 
I need to open a text file game_scores.txt and i can not figure out a way to. #include <iostream> #include <string> #include <fstream> using namespace std; int...
[10 replies] Last: i love you ;) thanks (by ricefieldboy)
October 2013 Pages: 1... 2627282930... 46
  Archived months: [sep2013] [nov2013]

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