General C++ Programming - October 2013 (Page 3)

GCC Compling
 
Okay, so I've successfully installed GCC on Mac 10.6.8 Snow Leopard. But once it's installed and stuff, how do you use it to compile a program? I have the progr...
[4 replies] Last: Yes. Esample (see Albatross answer for more detailed infos): step1: c... (by Nobun)
linking to boost?
 
so im making a makefile generator for a project, and decided to use boost.filesystem. do i have to link to anything when i compile it?
[16 replies] Last: actually im not using boost anymore. i was using it to generate makefi... (by closed account Dy7SLyTq)
vararg warning
 
Hi, I am using the vararg (NOT Variadic functions). For the below function void test_read(int stmt_id, long *testval, ...) { int vl_length = get_length(stmt_...
[3 replies] Last: To give you an example, this is how va_start is defined in one of the ... (by Cubbi)
Static Polymorphism
 
Hi everyone, As the topic indicates, I have a few questions regarding static polymorphism using the CRTP. Please consider following example: template <typena...
[8 replies] Last: Ah yes, I see, that makes sense. I think I need to put a little more t... (by closed account o3hC5Di1)
Power set
 
I am trying to do a compute and output a power set program. The numbers will be input through a file. I have no idea how to do a power set. Here is my code #i...
[1 reply] : have no idea how to do a power set. http://en.wikipedia.org/wiki/Po... (by kbw)
by zkyzky
how to solve these errors
 
no matching function for call to `Rectangle::Rectangle(std::string&, bool&, int&, Point&)' no matching function for call to `Square::Square(std::string&, boo...
[1 reply] : Line 191, 214, 237: object takes an array of points as the 4th paramet... (by AbstractionAnon)
Dynamic Memory Allocation
 
I am new to C++ and is learning about dynamic memory allocation. I wrote a code to learn the use of "new" operator but is having problem with the output. Here's...
[1 reply] : Duplicate thread: http://www.cplusplus.com/forum/beginner/115231/ -Al... (by Albatross)
Override a FILE class
 
i need to override a few methods in FILE class so i defined few methods as EnCrpt * fp; fp * fopen(const char * filename, const char * mode); ...
[9 replies] Last: Okay... here's the deal. You cannot override FILE. Any code that y... (by Disch)
Console to Game Programming
 
Hey, I am a Junior in college as a computer science major. I have been programming primarily with C & C++ on fedora using vim and gcc or g++ compilers. I am...
[3 replies] Last: @Shren, the OP said that he was using Fedora, which is NOT windows. Th... (by TwilightSpectre)
Linked List
 
I am getting errors and I feel that is is a small mistake (like a typo or something and I just can't find it. I am hoping that a fresh set of eyes could spot it...
[2 replies] Last: Check out the top of: http://www.cplusplus.com/reference/list/list/ins... (by ShodanHo)
Getting a file and Calculate
 
Hello everybody. I am a student who is taking a C++ class and I am doing an assignment that I dont know is correct. Our teacher says that even if you get the ri...
[2 replies] Last: Thank you, for your explanation Albartross. But I dont get why you say... (by tetricsteel)
do-while loop
 
I am not quite understanding how to change this program into a do-while loop. Can anyone help me please? int number, product = 1, count = 0; cout << "Enter ...
[3 replies] Last: After you enter a zero, the else if statement will work. However, the ... (by tkchau)
Investment amount, annual interest rate, months
 
#include <iostream> using namespace std; int main() { double investmentAmount; double interestRate; double months; double monthlyInteres...
[no replies]
by Marr45
Toothpick lab
 
I'm working on a toothpick game (lab) for C++ unfortunately I keep getting strange results every time the game ends. For instance I'll pick up the last tooth...
[1 reply] : I'm not sure exactly what causes the errors, but here are some clues t... (by AeonFlux1212)
How To Become a Professional c++ Programmer (1,2)
 
I want to know That What Are the types of degrees that can be obtained to get a good job as a c++ programmer
[30 replies] Last: [quote=MikeyBoy]There's such a massive excluded middle here (not to me... (by BHX)
free UML reverse engineering
 
Hello everyone, I've read tons of threads, articles and all about UML plugins and programs that would allow me to reverse engineer my own c++ code. Honestly sp...
[no replies]
Complex number with overloading,given a partial program
 
you have been tasked to write a program that takes two complex number and return theie sum.However the + operator will not worl with complex numbers and you fig...
[4 replies] Last: and implementing the code as well,the .cpp file info is Given.... (by Kelvin Njuguna)
help with arrays
 
create a program that asks the user to input 10 integers of an array the program will add the numbers greater or equal to 10 need help guys thanks
[6 replies] Last: int k; cin>>k; why did you declare another variable? That bit is for... (by MikeyBoy)
need help, im trying to get output but doesnt come that way
 
I HAVE SOM ISSUES WITH MY PROGRAM, I HAVE MARK LIKE THIS /*xxxxxxxxxxxx*/ where there is a problem. see the output at the end then youll be able to figure out ...
[6 replies] Last: You need to think logically about your code. If you want to test wha... (by MikeyBoy)
by yhu420
Last line executed
 
Hi everyone, The little app I am currently programming crashes somewhere, and my debugger actualy does not work. So I tried putting some cout << "blop\n"; ev...
[3 replies] Last: If you are lucky, then the crash has occured inside of an STL containe... (by Stewbond)
October 2013 Pages: 12345... 46
  Archived months: [sep2013] [nov2013]

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