|
More site info...
C++ Programming | Forum profile
|
|
Forum profile page for C++ Programming on http://www.cprogramming.com.
This report page is the aggregated overview from a single forum: C++ Programming, located on the Message Board at http://www.cprogramming.com.
This forum profile page summarizes the general forum statistics such as: Users Activity, Forum Activity, and Top Authors, which are reported in either a table or graph below for a given reporting time period.
Additional forum profile information for "C++ Programming" on the Message Board at http://www.cprogramming.com is also shown in the following ways:
1) Latest Active Threads
2) Hot Threads for Last Week
Warning: These statistics are generated using 'best efforts' and can experience delays and reporting errors at times. Please note that such statistics do not constitute a forum's popularity and/or exact posting volumes at any given reporting period.
|
|
|
|
|
Posting activity on C++ Programming:
|
|
Week
|
Month
|
3 Months
|
|
Threads:
|
86
|
364
|
1,348
|
|
Post:
|
372
|
1,476
|
6,108
|
|
|
C++ Programming Posting activity graph:
|
Top authors during last week:
user's latest post:
macro for looping through a...
Published (2009-11-28 12:47:00)
Quote: Originally Posted by cpjust Shouldn't std::for_each() work too? That is what I mean by "applying an appropriate generic algorithm", though I hope that an even more appropriate algorithm is chosen, if feasible (or maybe a std::map specific algorithm should be used). The Boost.Foreach documentation notes that this "forces us to move our logic far from where it will be used", unless lambda...
user's latest post:
addressbook
Published (2009-11-28 07:04:00)
Code: #include<iostream.h> #include<conio.h> #include<string.h> class Date { public: void setDate(); void printDate(); private: int month; int day; int year; int checkDay( int ) const; }; void Date::setDate() { int mn,yr,dy; cout<<"Enter Month:"; cin>>mn; if ( mn > 0 && mn <= 12 ) // validate the month month = mn; else { //...
user's latest post:
I have a problem...
Published (2009-11-28 15:32:00)
Stick with it! you will soon be rewarded with satisfaction of seeing your ideas realised, and your skills will grow quickly, i would recommend declaring all the variables you plan to use at top of main for now, to avoid the confusion explained earlier
user's latest post:
I have a problem...
Published (2009-11-28 14:21:00)
Arcantos247: the 'd' has to be outside the {}'s because a variable doesn't exist after the curly-bracket that closes the scope it is in. E.g. Code: { int d; // d exists here { int e; // e exists here, and so does d } // e does not exist here, but d still does { int f; // f exists here, and so does d } // neither e nor f exist here, but d still does } // all of the above variables no longer exist here
user's latest post:
overloading bit shift
Published (2009-11-28 16:20:00)
I think these operations don't modify the left-hand argument.
user's latest post:
(char)09 not valid?
Published (2009-11-25 20:23:00)
Quote: Originally Posted by brewbuck It has nothing to do with typecasting. The compiler would complain the same way if the cast had not been there. I know I'm new to C++ programming but can you explain what you mean? My request to have it included in the tutorial is based on the below, where I got my code for the char conversion from. Cprogramming.com Tutorial: Typecasting Second code example down... the tutorial needs the different...
user's latest post:
overloading bit shift
Published (2009-11-28 17:04:00)
Ah, right. I was thinking of something else. My mistake.
user's latest post:
Problem with time converting...
Published (2009-11-24 17:17:00)
Well since you seem to understand how to get the hours, you just need to know how many minutes are left over. There is a "mod" (modulo/modulus) operator that gives you the remainder after a division. So the remainder after dividing 90/60 is 30, which is exactly what you want. So just look up an example of how to use it. The actual operator is "%", and is used just as any other binary operator (+, -, /,...
user's latest post:
Ancient enum?
Published (2009-11-28 12:31:00)
Quote: Originally Posted by rogster001 In a recent post the use of enum was described as 'archaic' why would that be? Surely its a convenient way of listing a group of constants? It could have been me, stating that static consts are preferable for the purposes of template metaprogramming. Everywhere except that context, there's nothing archaic about enum.
user's latest post:
Pluggable C++ Code
Published (2009-11-28 19:36:00)
No, I am not talking about parsing C++ code. I am talking about linking to precompiled source code during runtime. The interpreted language thing was kind of a side question, I was wondering if it would be a better alternative for my project than linking at runtime. This project is a little experimental GUI toolkit using Xlib, and I thought that linking to a seperate piece of code that draws the widgets during runtime would be a good way to...
|
|
|
|
Latest active threads on C++ Programming::
Started 6 days, 9 hours ago (2009-11-28 10:38:00)
by laserlight
You could take a look at Boost.Foreach . In the next version of C++, there will probably be a range based for loop that would make this redundant.
Of course, you could also consider applying an appropriate generic algorithm instead of using a convenience macro.
Started 6 days, 4 hours ago (2009-11-28 15:39:00)
by Elysia
As all other operators look like:
lhs operator << (const lhs&, const rhs&)
Or
lhs operator >> (const lhs&, const rhs&)
Remove lhs& if you're overloading inside a class.
Started 6 days, 11 hours ago (2009-11-28 08:56:00)
by rogster001
Not sure what you on about but unless you choose rebuild then the rest of the program remains as compiled in the current object file
Started 1 week, 2 days ago (2009-11-25 01:07:00)
by laserlight
Sounds doable. Go ahead and do it
You might want to read the homework policy if you run into problems and want to ask for help here.
Started 5 days, 20 hours ago (2009-11-28 23:26:00)
by iMalc
There are a lot of large number libraries out there. Some open source ones, and lots of people have their own home made ones.
My own one is one that stores the binary data in exactly the same way a processor that could handle that number size would, if that's what you're asking.
Started 1 week ago (2009-11-27 19:04:00)
by iMalc
Your operator < would work, but it sorted descending and was far longer than it should be: Code: bool operator < ( const data& d1, const data& d2)
{
return d1.getName() < d2.getName();
}
I mean, you are using std::strings right since this is C++? Code: 0
/ \
/ \
/ \
1 2
/ \...
Started 6 days, 7 hours ago (2009-11-28 13:01:00)
by Arcantos247
I have a problem... I was going to make a calculator, and whaddayaknow, it didn't work. Whatever I do, I can't seem to fix it.
Here comes the source code... Code: [tag]#include <iostream>
using namespace std;
int main()
{
int a;
cout<<"Please enter a number up to a maximum of 10 billions: ";
cin>>a;
int b;
cout<<"Please enter another ...
Started 6 days, 18 hours ago (2009-11-28 02:11:00)
by prominababy
problem with hash table i got this problem in creating a hash table for string. Basically, my program will ask the user to input the string, than the program will create the index by calculating the ascii number of the string and put the string into an array of pointers. and i also use struct to contain the string. this is my code ( its a english-indonesia dictionary) :...
Started 6 days, 7 hours ago (2009-11-28 12:28:00)
by rogster001
Ancient enum? In a recent post the use of enum was described as 'archaic' why would that be? Surely its a convenient way of listing a group of constants?
Started 6 days, 11 hours ago (2009-11-28 08:39:00)
by midnight
Ctrl+d Hello, guys!
I have a question for you, how could I implement a catch of CTRL+D? I have a program, which reads strings untill is pressed CTRL+D, and I don't wanna have ^D in a console . After I press CTRL+D I have to press ENTER, and only after that my program stops . Have any ideas?
|
|
Hot threads for last week on C++ Programming::
Started 1 week, 2 days ago (2009-11-25 14:06:00)
by BdON003
Sure, at the top, use this instead Code: #include<iostream>
#include<conio>
Ok, please mark as SOLVED.
Seriously though, what kind of errors are you getting?
Started 6 days, 11 hours ago (2009-11-28 08:56:00)
by rogster001
Not sure what you on about but unless you choose rebuild then the rest of the program remains as compiled in the current object file
Started 6 days, 7 hours ago (2009-11-28 13:01:00)
by Arcantos247
I have a problem... I was going to make a calculator, and whaddayaknow, it didn't work. Whatever I do, I can't seem to fix it.
Here comes the source code... Code: [tag]#include <iostream>
using namespace std;
int main()
{
int a;
cout<<"Please enter a number up to a maximum of 10 billions: ";
cin>>a;
int b;
cout<<"Please enter another ...
Started 1 week ago (2009-11-27 11:33:00)
by Dino
Checking for valid dates is different from date arithmetic. Which one are you asking about?
Started 1 week, 2 days ago (2009-11-25 01:07:00)
by laserlight
Sounds doable. Go ahead and do it
You might want to read the homework policy if you run into problems and want to ask for help here.
Started 1 week, 1 day ago (2009-11-26 09:34:00)
by laserlight
operator~ is a unary operator. Therefore, if it is overloaded as a member function, it must have take no arguments. If it is overloaded as a free function, it must take exactly one argument.
Started 1 week ago (2009-11-27 07:55:00)
by laserlight
Assuming that MyObject has normal copying semantics, that would cause obj1 to be a copy of obj2. They are nonetheless different objects.
Started 1 week, 1 day ago (2009-11-26 09:59:00)
by rogster001
well i see you have not declared function lowest rainfall
Started 6 days, 4 hours ago (2009-11-28 15:39:00)
by Elysia
As all other operators look like:
lhs operator << (const lhs&, const rhs&)
Or
lhs operator >> (const lhs&, const rhs&)
Remove lhs& if you're overloading inside a class.
Started 1 week, 2 days ago (2009-11-25 18:10:00)
by Dae
- private is implicit
- don't need return 0
- print text should be printf, or use c++ cout
- print doesn't need arguments if its inside the class, if its outside u need to "friend" it
- indentation should line up Code: #include <stdio.h>
#include <stdlib.h>
class SomeClass
{
int x;
int y;
int z;
public:
SomeClass(int x, int y, int z)
{...
|
|