General C++ Programming - August 2010 (Page 17)

Extra value in Histogram
 
I built this program in Visual Studio 2010 and it needed to display a histogram of the values input from the command line. I did that but there is an extra valu...
[4 replies] Last: Thanks alot that worked perfectly. Here is the completed code #incl... (by LostCoder)
by Oculus
How to dynamically access structure fields? (1,2)
 
Hi everyone, Could anyone explain me how to access fields / variables in a structure without directly calling them? For example if I have a structure like so:...
[22 replies] Last: I guess you could somehow mix the two design approaches to fit your ne... (by m4ster r0shi)
Trying to find the mode!
 
I need help finding the duplicate values by using a vector<double> interator. I am using a vectore that is already sorted and am trying to find a way to count t...
[1 reply] : hey, just go to my post, i have already solved it. (by david leonard)
Error in execution
 
I have the following code to find first and second largest elements of an array: using namespace std; #include<iostream> #include<conio.h> #include<cstdi...
[4 replies] Last: I got the mistake.. getch() was missing.. (by gaurav13191)
by vijkrr
why derived is geting called
 
hi class Base { public: void get (int a) { cout<<" inside base "<<endl; } }; class Der: public Base { public: ...
[9 replies] Last: It is evident you do not know what "syntax" means. The syntax of a ... (by Bazzy)
STL find ()
 
Aloha everyone! I am trying to use the find () in the STL but I seem to be doing something wrong, but I can't figure out what. It looks as though I only need to...
[3 replies] Last: You don't want to name variables "list", there is already a std::list. (by moorecm)
How to limit a template class or function to specific types?
 
Hi all, I am new here. Just a quick question. consider a template function prototype like this: template <class X> void myfunc1(X &var); or te...
[5 replies] Last: In general it is not possible in C++, unless you wish to create an ove... (by xoreaxeax)
encryption/decryption problem
 
my goal would be to create an encrypted communication between a client and server c strings and std::string use the null terminating character as the end of ...
[9 replies] Last: thanks, but as for the solution for converting the original string to ... (by unregistered)
Not proper setting of a char array.
 
#include "stdafx.h" #include "iostream" class tire { public: char material ; // char error here double weight; char tiretype;}; class vehicle { publ...
[5 replies] Last: Btw, it should be int main() (by firedraco)
by nick85
opening file
 
hi guys i'm trying to check if a file is a .png or a .bmp i know how to check to see if the path filename is a .png or .bmp but people can edit the file extens...
[2 replies] Last: Ugh...definitely a spammer. (by Zhuge)
How to access the function pointer from vector of structure
 
#include <iostream> #include <cstdlib> template<typename Data_T> class test { public: void test_func_1(const Data_T &var) { std::cout << "test_...
[3 replies] Last: Duplicate post: http://www.cplusplus.com/forum/general/26148/page3.ht... (by Galik)
by Wander
SDL Input Explaination Please
 
Hello! I'm currently learning SDL and I found this code on a tutorial website. They did a rather poor job in explaining what was going on in the code, in my opi...
[1 reply] : I call this the Microsoft Example Syndrome. It makes people write over... (by helios)
by hans4
C++ 6.0------>C++ express?
 
so i took a class about a year ago for C++ programming(im in highschool) i was bored so i thought id get back into it....but the only C++ program i can find is ...
[2 replies] Last: Not only that - MFC which was a big part of 6.0 is not included in th... (by guestgulkan)
Expected primary expression before token
 
Hi,I am new to cplusplus and would like to know the error in this code void initpoly(struct poly *p) { int i; p->noofterms=0; for(i=0;i<M...
[2 replies] Last: No need to answer.. I found the bug in my code... (by gaurav13191)
How do i add strcmp into this ?
 
Anybody have any idea how am i going to add strcmp into here?? char username , password ,usercheck ,passcheck ; int count=0, index=0; int option; c...
[3 replies] Last: char a = "first string"; char b = "second string"; // if(a ==... (by Disch)
Simple question about copy constructor and assignment operator
 
Hi, I have a simple question about copy constructors and assignement operators, but i don’t seem to find a clear answer. When you overload the default ones,...
[3 replies] Last: No. S does not need a copy ctor. The only way I can see that being... (by Disch)
C++ cout code
 
Hi , can someone point me to the code for doing cout << for printing text that is inside a box on the screen.. and this code would not use VC+ code just c++ co...
[6 replies] Last: Like this? string s = "Hello"; cout << "+-"; for( int i = 0; i... (by moorecm)
Copy to forum
 
How can I insert a small textfile in here?
[2 replies] Last: http://pastebin.com/ pastewin (by Skillless)
by zuwaka
math.h and cmath problem
 
I've been trying to use math.h in one of my programs, but nothing's working. I'm using VC++ 2008. This simple code fails. #include <iostream> #include <mat...
[8 replies] Last: I upgraded to VC++ 2010, and the problem seems to be solved. (by zuwaka)
Electronic Circuit Simulator
 
I'm going to create an electronic circuit simulator. What books/papers/algorithms do you recommend?
[8 replies] Last: If it was so simple to find in a Google, I would do it. But it returns... (by xoreaxeax)
August 2010 Pages: 1... 151617181920
  Archived months: [jul2010] [sep2010]

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