General C++ Programming - December 2010 (Page 6)

2D Array Passing to function - only reads first line
 
Hi guys, Hoping someone has some insight to what my issue is. Any help would be greatly appreciated. I have an array of char 4x4 that is being passed into a...
[2 replies] Last: The game board never changes (or gets modified). Since I never made a... (by ghostfacelz)
by hannes
header reference problem
 
Hi, I've just started developping my program today and i recieve some errors already. Code: //A.hpp #ifndef A_HPP #define A_HPP #include "b.hpp" ...
[3 replies] Last: ok, thanks for advice, the article was really helpful! hannesvdc (by hannes)
by jonnie
class template specialization - incomplete type
 
Hi, I have a problem, this code won't compile. It says the class foo<10, int> is incomplete... Can someone here tell me what's wrong, and how to correct it? ...
[1 reply] : Partial Specialization of template functions are not allowed E... (by guestgulkan)
Converting 24 bit bmp to 8 bit grayscale
 
Hello! I am trying to write a bmp class. I became interested while studying pattern matching in artificial intelligence. For class, we had to write an algori...
[9 replies] Last: ah, yep... I see it now... Thanks. Things are starting to clear up n... (by keepjumpin)
How do I have undeclared functions?
 
Here is my random code. Im trying to figure out what Im doing wrong here. Anyone help? #include <iostream> #include <string> #include <vector> #include...
[4 replies] Last: There's no standard way of creating a backspace, although I'd suggest ... (by Albatross)
Conventions with Objects
 
I am working on a project that has a tree of objects. I just took a beginner's C course and my professor mentioned something about using pointers with structure...
[no replies]
comparing a string from a file in C
 
guys could anyone help me how to compare a strinf from a file. example i entered the word "plus" then the program should search it from a file then print if i...
[1 reply] : strcmp returns 0 when strings are equal. if(strcmp(store,get)==0) //... (by Null)
Hashing troubles
 
Hi, I'm trying to write a program that is a calculator that (as an added bonous) will also calculate the md5 hash of a given string of text. I am having s...
[2 replies] Last: Hi, I want the user to be able to enter in the text they want to be... (by smd75jr)
In need of a ini library with sectionNext and keyNext
 
Hey guys, I normally don't like asking for links to resources, however, after trying a dozen ini libraries/source for such functionality for seeking sections/k...
[4 replies] Last: Thanks, had no idea it had an ini parser due to the name. =P (by Krisando)
by aatwo
Array Pointers
 
Hi. Just curious. When passing array pointers around functions is there a difference between the following lines of code? ... // Function to which the array ...
[3 replies] Last: int *ptr = NULL; &ptr ; // Is it safe? (by ne555)
string variables as arguments to constructors
 
I'm trying to accomplish something of this fashion: // Constructor for class A A::A(string filename) { ifstream file(filename); // Do stuff ...
[2 replies] Last: That worked wonderfully. Thank you very much for the help =) (by shadowayex)
by uiiihr
Priority Queue - very slow
 
Hello! I am trying to use priority queue to store my nodes, and I need to insert and retrieve elements very frequently. The size of the queue increases dramatic...
[4 replies] Last: No, it will not. I did an experiment, the code finish the loop in a se... (by uiiihr)
New Pointer Object and leaking?
 
So let say we set up a vector. Then we push_back an instance of our first custom class. vec.push_back(new Ccustom1(24)); std::cout << vec .custint /// s...
[2 replies] Last: You meant "destructor". Alternatively, check out boost. The STL ... (by kempofighter)
Using overloaded iterators inside class functions
 
Hi; I have the following simple 2d array class: /* * array2d.h * * Created on 04/04/09 * * 18/12/2010: added swap function, another opera...
[9 replies] Last: I got it, thanks (by alexmbcm)
by Gnaget
array being filled with same pointer
 
First, and foremost, a warning: I am a c# developer, so c++ is a whole different beast for me... I am using OpenCV to grab images from a webcam, and I am try...
[5 replies] Last: The MAX_HISTORY - 2 is used since the loop references i+1 Yes, but ... (by Athar)
c++ problems with printing bubble, insertion, and selection sort program?
 
I have been working on a program that requires me to use bubble,insertion, and selection sort. My program runs without any compiler errors. I have printed out t...
[1 reply] : template < class ItemType > void Swap(ItemType r, ItemType l); That ... (by ne555)
by m75214
Mercurial
 
I use Wifi, so I don't have an SMTP server. However, I want to use Mercurial to e-mail myself changesets. Is there an easy way to do this?
[no replies]
how to load image files in c++??
 
I'm in 3rd semester/term of BS(CS). I have got a project to make Pacman game only in 2 weeks. I request my seniors here to give some idea n guide me...
[3 replies] Last: Thanks Athar & Duoas... (by mdanyjam)
by Null
How to avoid goto in this code
 
Hi, How can avoid using goto in this code? int f(){} // may or may not throw an exception int main() { int x; try { x=f(); } catch...
[4 replies] Last: This problem can be fixed with another try-catch block: int f(){} ... (by Null)
pointers
 
Hi……..can any one help plz.. I want to know clear difference between them….(plz explain with example in every case) Const int *p Int const *p Int ...
[2 replies] Last: tnx alot (by lovelyhakeem)
December 2010 Pages: 1... 45678... 24
  Archived months: [nov2010] [jan2011]

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