General C++ Programming - December 2011 (Page 37)

exceptions with namespace hierarchy, what(), why(), line(), file()
 
Hi again! This post seeks well explained opinions about the further outlined approach of using exceptions. It's presumed that nothing more than just the ty...
[2 replies] Last: Perhaps usability for debugging purposes? If exceptions are for error ... (by KarlisRepsons)
Creating 2D array in header
 
Ok, so I'm writing a matrix program that'll do basic function such as addition and multiplication. Right now, I'm creating the object matrix, and I'm having tro...
[3 replies] Last: wow, that's not very convenient, but it works. Thanks! (by Anubhaw Arya)
two class circular dependency resolved by templates
 
Greetings to all! Below I post a short example where two structures are having some sort of a circular dependency, which is only working if templating gets...
[8 replies] Last: Compilers work templates differently. C++ compilers construct the tem... (by webJose)
Boost won't compile on Code::Blocks
 
I've been trying for about 3 days trying to get boost to compile with my application and keeps build messaging these 4 errors C:\boost_1_47_0\stage\lib\libbo...
[no replies]
Error message confusion
 
Hi guys, im doing an assignment to create a c++ program that enables a user to book a seat in an airline reservation, i have managed to write out a code but i k...
[3 replies] Last: for the first mistake remove semicolon in line 32, for the line 23 pu... (by Karajic)
Seg fault I can't seem to fix
 
I believe my headers and 2 of my .cpp files are correct. however i get a segfault that seems to be because of lines 20 and 32 of the second code block. I can pr...
[6 replies] Last: If you build with debug symbols and then run it under a debugger, it w... (by Moschops)
Why is std::map::operator[] w/o const version?
 
Hi all, I see there is no const operator method for both std::map and boost::unordered_map. Why is that? I'm almost done with a tree-like structure of maps an...
[9 replies] Last: Actually true about access: would be ugly to use full path through ope... (by KarlisRepsons)
WxWidgets
 
Hi I'm trying to start with wxWidgets (developing under Debian). But I don't understand why I should "install" wxWidgets. Why can't I just include the header...
[7 replies] Last: Where can I choose the way to link wxWidgets (static/dynamic)? Is this... (by silvanm)
by bbgst
stoul
 
Could anyone explain why there are new functions in c++11 to convert std::string to various types, but there doesn't seem to be one for unsigned int (only ...
[1 reply] : Hi. I think you have read this article already. There isn't for short... (by pot)
by ancell
New to inputting via files - confusion!
 
I have a text file that i have created so i am open to changing the format. Or adding whatever i need to identify each row. My goal is to open the file and ...
[no replies]
Dependency Issues with Templates (1,2)
 
I have encountered a problem while working on a library, and have tried to simplify it without losing generality. How can I write the following code such that c...
[25 replies] Last: The project's on hold 'till I can come up with a better solution (and ... (by Mathhead200)
Creating i amount of classes
 
Here is the code i am working with right now. It is going to read in a number of lines of 3 ints that will be the x, y, and radius of a circle. However the numb...
[3 replies] Last: Thanks bbgst, method chain is powerful! btw, is it ok to call getli... (by pot)
by drew99
Edit prototype and declarations of functions
 
This is the structure of the program: void open (void); void insert (void); void search (void); void update (void); void delete (void); void d...
[2 replies] Last: Is this what you want? struct comp; void open (struct comp*); ... (by pot)
by Muly
How to translate C++ to Raptor
 
Hello I recently took a course on Raptor and C++ language , however it seems like Im stack with this code. I have created a program on Raptor but when I trans...
[1 reply] : Hi. what program do you want to translate? (by pot)
Binary Search Help (1,2)
 
im trying to do a binary search of of a student names. When it does the binary search it asks for the student name as search key: enter name here, and then it s...
[30 replies] Last: On main, after you read key : index = searchData(students, size, ke... (by bbgst)
Inserting code into Word
 
Hi There, I am trying to post code into Microsoft Word. The program I have is quite long. I tried to copy past and insert text into document, but all it gave...
[2 replies] Last: Thanks pot..it worked!! (by sanehatter)
Open GL
 
Hello, Im drawing a circle using open gl but the only thing that is being outputted is a transparent window. I thought GlFlush(); was missing but I added that a...
[1 reply] : Hi. in your function, void display (void) for (int angle=0; angl... (by pot)
Vector.size() returns -1???
 
I have a bit of code like this. while(myVector.size() > 0) { int sz = myVector.size(); //This was for debugging //Do a bunch of stuff and push ...
[4 replies] Last: Try this: cout << numeric_limits<unsigned int>::max() << "\n"; cout... (by bbgst)
by GOLF O
1 problem on one line of code
 
myfile >> name >> bookList .getName(tempStr) How come you are not able to do this? I want to parse the information and the put the information into an ar...
[7 replies] Last: Employee::getName() returns a copy of your name, a temporary object th... (by bbgst)
random number
 
how can i solve this problem The <cmath> function sqrt(x) is used to calculate the exact square-root value of the number x such that x is a non-negative rea...
[4 replies] Last: please correct this programe????????????? #include<iostream> #incl... (by Almamri)
December 2011 Pages: 1... 3536373839
  Archived months: [nov2011] [jan2012]

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