General C++ Programming - September 2014 (Page 25)

VGA End horizontal blanking 0?
 
What happens when the VGA is programmed with the CRTC's End horizontal or vertical blanking set to 0? Would the VGA still output a blank line(vertically) or pix...
[no replies]
Question about reference syntax
 
I see syntax as Object p; ... Object& o = p; Is this something similar as Object p; ... Object* o = &p; Thanks
[1 reply] : A pointer and reference are similar in many ways and a reference is al... (by a k n)
by abc1
increment/decrement operators
 
hi, In the following program. void main() { int a=1; cout<<a++<<"\t"<<++a<<"\t"<<a++<<endl; } if i execute the above program i should get 1 3 ...
[2 replies] Last: The behavior of the program in Undefined. For example see this output ... (by a k n)
Any idea where the registry keys for allowed applications are stored in windows 8?
 
I'm trying figure out how Windows Firewall functions by experimenting with Bittorrent's add exception to windows firewall option, I deleted the entry from the F...
[6 replies] Last: i'll try that. It looks like exactly what i've been looking for (by simptri69)
by drawar
BankAccount class
 
Hi, I'm supposed to build a banking simulation program around the BankAcct class, which provides the following service: create new account with unique account n...
[1 reply] : program just keep on crashing Any idea where? edit: at a quick gl... (by mutexe)
centimeters to feet and inches conversion
 
Given as input a floating (real) number of centimeters, print out the equivalent number of feet (integer) and inches (floating, 1 decimal), with the inches gi...
[13 replies] Last: For what input? 300? Print whitespace between values. Substract the ... (by keskiverto)
count number of sentences in a string
 
Hi, I am writing a program that counts the number of sentences in a string. I count the number of '.' '?' '!'. However, there are Mr. Mrs. PhD. Dr. ..... situ...
[3 replies] Last: 3000 characters is tiny, even a bad implementation of std::string wi... (by LB)
by soranz
inheritance
 
Hi! I have 2 classes where A inherits from B. I'm trying to use ofstream to create a logfile that both have the option to use but I'm not sure how to get the ba...
[4 replies] Last: Thank you JLBorges ! I understand how to do it now. (by soranz)
Avoid Redundant code in derived classes.
 
Hi Folks, ISSUE: How to avoid redundant code in c++ ? Problem:Say I have a Base class called Car and it has 3 derived classes say Ford, Honda and Audi. ...
[1 reply] : You can define the common code in the base class virtual member functi... (by LB)
by zxrp
Iterating through a Vector of Pointers
 
Hey guys, If I have a Vector of pointers, how can I iterate through that vector, to access the name function of each object in the vector? There seems to be a ...
[10 replies] Last: I think I fixed another small error in elsewhere in my code, where I f... (by zxrp)
by zxrp
Looping through a Vector of Object Pointers
 
Hey guys, lets say for example I have the following vector: vector<Component*> mComponents; and a function print() inside of class Component that prints...
[1 reply] : I found the solution, never mind, here it is: vector<Component*>:: i... (by zxrp)
by AGZZ21
Getting the optimal change in cents.
 
On one of my assignments I have to find the optimal change. For example, if I were to have 70 cents and had only quarters, dimes and pennies, the best way to re...
[1 reply] : What I would do is sort the array for highest to smallest(or just assi... (by giblit)
by flony1
step two vectors to a function
 
hello forum friends I have a doubt and I have two vectors to a function. a vector is (int *, const int) and the other is (string *, const int) and want to spe...
[1 reply] : Perhaps there is a translation mistake? "vector" refers to the std::v... (by LB)
Pricing a Bond
 
Hello, I have written a code that prices a bond, but its pretty messy, is there anyway to condense the code somehow, if yes how? Thank you in advance. "Write...
[3 replies] Last: Any help with for loops? I would really appreciate it. (by JohnMyer87)
Yes/No while loop help
 
Hi, I'm new to C++, and for a class project we had to write a code to exchange the user's input money value into change. What I want to do is create a yes or no...
[1 reply] : std::string Done; do { // Your code d... (by monochrome)
Changing relative path reference
 
FILE* pFile = fopen ("./myfile.txt","w+"); Is there a way to change what a relative path is referencing after runtime has started? My specific issue is ...
[4 replies] Last: You're right, that's even better. I already used boost::filesystem in... (by Stewbond)
Specifics concerning #include
 
I am using GCC via MinGW/MSYS under Windows. Currently i am using a home-brew IDE based on several Python & batch scripts, using Notepad++. Every time i compil...
[4 replies] Last: If you're running all the files through a script anyway I'm not sure w... (by LB)
Need code to Exit function after 5 minutes.
 
Hi All, Need your help. I have a function which sometime takes more than 24 hours to run. So I want a code which will check the time and exit the function if ...
[9 replies] Last: Hey, Could you please give me small programming example on using separ... (by pdsharma86)
unable to input data
 
Whats wrong with my code, I wasn't able to input for Lastname field. Can somebody please take a look at this. Any help would be so much appreciated. Thanks ...
[1 reply] : char fname, lname; means that fname, lname are single characters no... (by coder777)
Error 4 error LNK1120: 1
 
I am a C++ beginner and am trying to make a address book program that can write names and phone numbers to a file and then be able to view them later. I am not ...
[1 reply] : Hi there ! If you look right here you can see the compiler's hint at ... (by soranz)
September 2014 Pages: 1... 232425262728
  Archived months: [aug2014] [oct2014]

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