General C++ Programming - April 2009 (Page 12)

by Disch
template friend class
 
I have a template class who needs to be friends of all other classes made from that template. ie: MyClass<int> needs to be friends with MyClass<float> .....
[2 replies] Last: nah -- because MyClass<int> and MyClass<float> are two seperate classe... (by Disch)
malloc() Question
 
Hi Guys, I have a quick question. Actually, I developed a program on MAC OS X (Terminal) and it works fine, however when I run that same program on Linux Ma...
[4 replies] Last: It might happen to have been zero; C++ is not going to initialize a PO... (by jsmith)
by ilyes
problem with vector of other classes
 
hi, please see with me this pb class XXX{ ...... }; class YYY{ public: .... private: vector<XXX*> composant_xxx; // this ligne generate an erro...
[3 replies] Last: Then your code must not be arranged the way you think it is. The exam... (by Disch)
including header file based on OS.
 
Hi Everyone I have 2 header files; say linuxstdio.h and windowsstdio.h in my project source. /project/src/linux/include/linuxstdio.h /project/src/windows...
[3 replies] Last: you can define a variable and then you can compile. i give you an exa... (by writetonsharma)
how to include a function from another file
 
Hello, i was wondering how do you include a function from another file to the main file, something like this #include <DrawLine.cpp> and then lets ...
[3 replies] Last: simply rename the .cpp extension? and dev-cp will recognize it ye... (by writetonsharma)
by masiht
how to print matrix
 
Can anyone please tell me how to print the result of this program in one line like this 123 123 246 123 + 123 = 24...
[4 replies] Last: yes the middle line has needs to be between the two (by masiht)
ADT's, Overloading, and Classes trouble?
 
I'm trying to create an address book application, and HAS to use this AddressBook class and header file (unaltered): const int ENTRY_SZ = 256; class Addre...
[3 replies] Last: you haven't declared the constructor/destructor and defining one. c... (by writetonsharma)
how to use a static library?
 
hello: i want to use a static library in my program,but have no idea how to use it. i use wxDevc++ int main(void) { // i want to use the function ...
[no replies]
fscanf input
 
Hi, i'm working on a project and i'm trying to dissect someone else's code. They used fscanf and i can't replicate their results. I've tried figuring this out...
[no replies]
I am confused what are the outputs thank you
 
If you are not going to help please do not respond What will be the output of int n=4; while (n <=13) { n +=3; if (n>9) break; } ...
[5 replies] Last: ms vc for student edition or express edition is also free.. (by writetonsharma)
Looking for someone to program with.
 
Hi I'm looking for some one to program with. I just want someone to help me and if possible for me to help them. We would be communicating through IM eithe...
[3 replies] Last: I added both of you to im contacts thanks for answering. Just a heads ... (by whOOper)
stuck storing a 2d 3 x 7 array & problems with logic
 
Hi guys im a new bee, im working on this assignment & I want to get how many pounds of food each of its 3 monkeys eats each day during a typical week. So, I hav...
[3 replies] Last: so i nested it and it looks like this now: cout << " \tEnter t... (by john123)
c++ Arrays
 
Hi, I've read over the lessons for arrays and I can't figure out how to use arrays in math problems. The example I was given uses the array in math with a for ...
[4 replies] Last: Thank you for clearing that up for me that really helped. (by whOOper)
How would I write this??
 
Write a template for a function that will return the larger of two data types. Give the definition of the template only (no prototype necessary).
[1 reply] : a function that will return the larger of two data types does that ... (by Bazzy)
program wont output line to file
 
Hey it's me again, Everything executes flawlessly save for outputting new users to a .dat file It runs fine all the way through executing the "cout << "Ne...
[no replies]
by upo
How to combine two images together
 
Hi guys, I need assistance in this. I am supposed to make a function:combineImage(const Image & im, int I, int j): that combines two images together, The positi...
[2 replies] Last: The hardest part seems to be resizing the image. Another thing that... (by Disch)
Chroma Key
 
Ok, So I been searching up on how to make a Chroma Key but can't find any good documentation that actually explains it in a code format related to c++. I'm l...
[4 replies] Last: Makes sense what your saying. I guess it's just how to attack the situ... (by Mythios)
What is the output??
 
int sum=0; for (int i=0; i<=3; i++) { sum = sum + i*i; cout << i <<sum; } The Out Put Is:_______ 2,6,15 is this the ouput n=13; do {...
[1 reply] : why don't you compile the code? Then you can see for yourself what th... (by Disch)
by Deimos
LZW compression?
 
Hello everyone, One area within computers which has always fascinated me is data compression. Recently I decided that I want to know more about it. I googled...
[2 replies] Last: Thanks mate! I still need to work on it a little more to get it, toug... (by Deimos)
stack vs. heap
 
If there is no memory available, memory allocation in heap returns a NULL ptr, and we can detect it by checking for NULL. How can I detect memory unavailablity ...
[19 replies] Last: great thats looks fun (by kaidranzer)
April 2009 Pages: 1... 1011121314... 20
  Archived months: [mar2009] [may2009]

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