General C++ Programming - November 2011 (Page 15)

by Paul2
Overloading << for a template class
 
I've done some searching and tinkered with syntax, and it comes down to, I have no idea how to do this. Currently the function in question is a mess because I'...
[9 replies] Last: Point taken Duoas - putting template logic in a .cpp file is bad pract... (by SIK)
Speeding up some functions.
 
I have a program im looking at and i am supposed to speed it up, it has a set of functions that rotate and smooth a series of blue and green pictures, if anyone...
[5 replies] Last: This is my new rotate int i, j; int ii, jj; for(jj=0; jj < ... (by sorthon123)
Need help with creating a template array
 
I have a programming project due for my object orientated programming class, where I have to create a class the handles dynamically adding and deleting items fr...
[1 reply] : In general, yes it's all the same. (the prototypes may be a little mor... (by ne555)
Pointers to swap locations in char array
 
Using pointers to revers the char array running into a problem with even numbered arrays. Any help would be greatly appreciated. #include <iostream> ...
[2 replies] Last: The problem is 'while(first!=last)' - think about the case where you p... (by rollie)
by Brac24
Counting Value instances in an array
 
I need help counting the number of times an integer comes up in an array of numbers. PLEASE Help!! this is what i have: include "DarkGDK.h" void Dark...
[1 reply] : The histogram counting code needs to run through the whole data array,... (by jim80y)
test prog in VS6
 
Hi, What I have to inlude/declare to make this main work, I'm using VS6 (sorry I can't upgrade to anything else in our non-profit). I want to check this code I...
[9 replies] Last: It all works now, tx again to all cpp'es (by mario17)
c++ Transitive Relation Function
 
I am having trouble writing my transitive relation function. I have written reflexive, symmetric and anti-symmetric but cannot figure out transitive. I am try...
[6 replies] Last: bool pair_exist(int left, int right, int b , int sizeOfB) { fo... (by SIK)
Whats happening in this code?
 
Hi guys, I got this code, but dont understand why its not working. It has something to do with cin and getline, but i dont see it.. Could you help me? T...
[6 replies] Last: Its semi-working now :D Thanks (by MrMajestyk)
Need help (ASAP)
 
hey again i have small problem i need help i want to print the "year with greatest and smallest increase and decrease" the years are from 2000 to 2009. i know h...
[2 replies] Last: void maxIncDecYears(int annualIncome ,int arraySize) { int greate... (by bluecoder)
by kcbob
can someone explain this to me
 
can someone explain me this is different terms Write a program that will trace how Fibonacci numbers are generated recursively (for any N) and display the tr...
[2 replies] Last: int fib(int n) { if(1 == n || 2 == n) { return 1; ... (by kcbob)
by jackie
Problem with Adding Record to End of File
 
Ok i am having a problem with this, for some reason it will not Add the Record to the End of the File. using namespace std; struct Student { int...
[4 replies] Last: Please excuse my indentation w.r.t. the while loop - I tried editing m... (by SIK)
by iPlus
What does it mean when it says (You must select a host application to run a library)
 
Can someone please help me? What does it mean when it says (You must select a host application to run a library). How would I fix this problem if there even i...
[4 replies] Last: A library by itself doesn't have an entry point, you need an executabl... (by Computergeek01)
Dreaded Segmentation fault 11
 
This code compiles, but on run throws Segmentation fault 11: #include <iostream> #include <string> using namespace std; class Cell { prot...
[4 replies] Last: Thanks! Solved. (by Wildebai)
ambigious overload for operator>>’ in ‘getfile >> point’
 
i keep getting the following error when i run this. any help? ambigious overload for operator>>’ in ‘getfile >> point’ this is my code in pp object ...
[2 replies] Last: just for curusity is point a string variable or char array . (by bluecoder)
Macro question
 
I am tired of typing, Is it possible to write a macro to automatically generate these code for me? e.g. #define GenerateInputOutputCode(idx1, field1, idx2,...
[5 replies] Last: True, but imagine this: If you can somehow create an array of the dif... (by webJose)
operator overloading
 
This is the program for performing concatenation using overloading + operator. The problem with the code is it is not printing concatenated string. #include<...
[6 replies] Last: thanks both of u for helping me out.... :) (by arjita07)
passing a vector as an argument
 
Hi, all - I'm experiencing an odd error. I'm attempting to pass a vector (by reference) to a routine. The vector contains 8 elements, but the called routine ...
[9 replies] Last: You're right, Athar. When you suggested using the asserts, I thought y... (by mzimmers)
by thuss
an option to goto in this code
 
case 7: inventory : system("title Inventory"); system("cls"); system("color 85"); cout <<"Please input the item of inventory's ID number\n"; cin ...
[3 replies] Last: thanxx man it soo worked (by thuss)
deleting and modifing data in files...plz help
 
can anyone plz tell me how to delete data n modify data in file in turbo c..... plz give an example for better understanding.....thq.....
[no replies]
Reading data from a file
 
Hey there, I'm trying to load in data from an external file for processing. But I'm having some trouble. I've been googling for some time but I'm not coming cl...
[2 replies] Last: Thanks for your reply! Hmm yes sounds logical, this is the first time... (by Nick van Kaam)
November 2011 Pages: 1... 1314151617... 47
  Archived months: [oct2011] [dec2011]

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