General C++ Programming - July 2011 (Page 29)

Compare large char*'s
 
Hello, I need to know something. Why won't compare large char* strings? Because i need to do that. The weird thing is that when i put their contents on scre...
[4 replies] Last: It was indeed invisible chars, I feed it in strncmp and substract 1 fr... (by roelf01)
Passing data members between classes.
 
I'm having a problem passing data members between classes. Double_t fiber_width = .1; struct hit { hit() {} hit(Bool_t isTop_i, Int_t x_fiber_i, In...
[2 replies] Last: Ahhh, thank you so so much. Solution 2 worked. Finally. I'd been st... (by anotherghost)
virtual inline function defined in header files.
 
If a header file has a function which is inline and defined in the same file. I read the following in a particular article. -----------------------------------...
[1 reply] : static, as used by the article, simply means that the "dummy" function... (by jsmith)
Sorting Lists Faster
 
Hi, I have following code but it is very slow during sorting. list<double> fitness; for(i=0;i<250;i++) { fitness.push_back(Random Number); } ...
[10 replies] Last: (i) Sorting algorithms for numbers suits best if the numbers are alloc... (by ashishkumar)
by Rinu
Advanced C++ Programming
 
How is c++ used in programming sockets,servers,embedded systems ,kernels and stuffs is the commands they use available in standard c++? where to learn them?...
[3 replies] Last: How about the kernel and embedded programming stuff? (by Rinu)
Triangle program...Help please!
 
I am a new programmer and this is a pretty difficult code for me as I dont have any resources. I need to write a program that reads three edges of a traingle an...
[5 replies] Last: clever come back #8 http://cplusplus.com/forum/articles/1295/ +1... (by firedraco)
Help in reading Binary files
 
I was trying this code and couldn't run it. Includes #include <iostream> #include <fstream> using namespace std; ifstream file; ...
[9 replies] Last: sizeof(KeyMap) == sizeof(__KeyMap) * 18 Try sizeof(KeyMap). It look... (by mackabee)
by rincon
Online tuts.
 
Hi! first time on the forums :P I have began to learn C++ on my own and I have chosen several websites to learn from including this one. Also I'm using, h...
[1 reply] : I haven't used those sources, but I would also recommend the tutorial ... (by ModShop)
Multi-source file problem.
 
Hello! I'm having trouble with my program. Here's my problem: I have a program with multiple source files, and I try to make a class in class.cpp, but when I t...
[3 replies] Last: Yes, you forward declare functions and define classes. (by ModShop)
Vector Iteration Problem
 
I am having some issues around iterating and incrementing through a vector, both it's element and it's values. What I am trying to do in this mess below is take...
[14 replies] Last: Well, you would iterate from the first to the second last element. Fir... (by shacktar)
istream ostream problem
 
header // Print to an output stream. This is a friend function, // so it is not a member of StrLib. // Overload << as a friend function friend ostrea...
[2 replies] Last: 1. error c2143; syntax error: missing ';' before '&' this error is re... (by sunflower1114)
Have I Got This Inheritance Code Right?
 
I've got this code segment which I'm unsure about. Here's the code: struct BASE { BASE( void ) { this->Member = ( new int( 10 ) ); } ...
[1 reply] : Yeah, destructors of derived classes always call the destructors of al... (by Athar)
boost::thread undefined reference
 
I copied this example exactly from the boost library examples. #include <boost/thread/thread.hpp> #include <boost/thread/xtime.hpp> #include <iostream> ...
[4 replies] Last: It works for me ,you need to link it to proper lib files libboost_thre... (by NewDev)
Help for C++ Rookie
 
Need help with a assignment and this programming stuff has really stressed me out. If anyone can help please let me know. Even if its just a outline of what i'm...
[3 replies] Last: Programming is much like learning entire languages. It takes maybe a f... (by closed account S6k9GNh0)
invalid in-class initialization of static data member of non-integral type
 
hi everybody i m new with C++ and i have some issues i have 4 classes: date, personne, employe(derived from personne) and Cie. in cie i have to use the priva...
[1 reply] : The error you are getting is because you are calling the new operator ... (by kooth)
Large matrix problem ...
 
Hi, I have a problem i have been working on: http://drdash.acm-acpc.org/problems/view/119 . The way i see it, you can solve it easily if you have tons of...
[7 replies] Last: I took what you said (about changing the offset) and changed a little ... (by pirlo89)
c++ complier
 
how to i download c++ best compiler and can i write a c++ programs in c compiler ???
[15 replies] Last: If you're on Windows, then I think Microsoft Visual C++ is a good choi... (by anonymous23323124)
Interesting Issue with a nested loop...
 
Alright, basically the following loop accepts a Card custom data type, the char* that the Card's RFID is being compared to, and the size of the table. (The RFID...
[6 replies] Last: Thanks for all your help. (by darkhorse)
Explain the output of following?
 
#include<stdio.h> void main() { char ch; if((ch=printf(1234)) printf("A"); else printf("B"); } Answer is B : But i don't ...
[1 reply] : Did you forget "" around 1234 ? The argument of printf is a pointer an... (by hamsterman)
getting a problem while using files
 
when i put the following code the problem i am getting is that it displays the last bit of information, present in the file, twice other than that the code work...
[4 replies] Last: thanks for the help it worked .. (by anuraag016)
July 2011 Pages: 1... 27282930
  Archived months: [jun2011] [aug2011]

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