General C++ Programming - September 2010

? random date generator in class won't work ?
 
so i'm trying to implement a random generating date so that everytime it is called a new random date will pop up! but it seems like everytime i run it, my progr...
[3 replies] Last: nevermind! i figured it out! thanks jsmith! i appreciate the informati... (by nscruggs)
how to print output program in visual studio 2008
 
hi guys. how are you all. I have a question regarding Visual Studio 2008. So far I am printing my output by running the program in win console and then copy the...
[2 replies] Last: Thank you helios for the reply. Is it possible to run the program in d... (by bshrestha)
Homemade String Class
 
#include<iostream> using namespace std; class String1 { private: char str ; public: // Constructors String1(); String1(char *); // F...
[8 replies] Last: My post wasn't meant to solve your problem. Instead it should point ou... (by CQQL)
by lgb
Vector of pointers to classes
 
I'm not very used to program in C++ , but I'm working in a robotics project using the Player/Stage environment, wich has a C++ library included.In this library ...
[7 replies] Last: It's this kind of non-orthogonal craziness that makes me hate C++... ... (by kfmfe04)
C++ Class/Queue problem
 
So my original program ran and did what it needed to do, but then I wanted to break it up into a class. I wanted to do it in a class because this is my first a...
[15 replies] Last: That's because at the start of Main you're calling a constructor with ... (by Pax)
sintax error & illegal indirection
 
I've a problem compiling this part of an header code with Visual Studio 2008. The file is called asymg.h: double digamma(double z) //line 102 { int p...
[2 replies] Last: Thank you very much. I was wrong defining M_PI. I wrote: #defi... (by graculo)
code is sorting descending instead of ascending
 
Hi, I need help on finding an error in one of my homework problems. I was supposed to create a code using only while loops to create a C++ program to sort a gro...
[3 replies] Last: If your sort is in decreasing order instead of increasing it's because... (by closed account 1yR4jE8b)
Storing some values from a string to some chars
 
#include <stdlib.h> #include <string.h> #include <stdio.h> unsigned char content = "ip1=10&ip2=10&ip3=4&ip4=210"; unsigned char ip_addr = { 0,0,0,0...
[3 replies] Last: Thanks guys for the quick reply, will post the completed code tomorrow... (by jimclermonts)
Socket connection passing
 
I have an existing socket which connects to the server when I click call. it is declared as CSocket Confcall;. then i will use hConf=Confcall.detach(); ...
[2 replies] Last: i solved it with CAsyncSocket (by carlsum1986)
How do I get it to show the equation on the output?
 
#include<iostream> using namespace std; int main() { //Declare variable int n1; int n2; int n3; int n4; int sum; int prod; //Get user input...
[3 replies] Last: Mate, you're missing the point. int n1square = n1*n1; this line tak... (by hamsterman)
Binary Tree of forked processes error
 
I cannot find the error in my program. The program builds a binary tree of forked processes. The build function itself works while recursing. Where I belie...
[1 reply] : doh, forgot the code :) #include <unistd.h> #include <iostream>... (by gpdominic)
Certain Recv()
 
I hate making an entire post about it but I'd like some advice on code style. I'm trying to make certain that recv is always getting at least enough information...
[3 replies] Last: Actually the time I have to deal with such issues is to do hardware le... (by sohguanh)
DLL Implementation & File handling
 
sooo i got this huge university prac due for firday can you guys please help me im really lost heres my question for my prac...... -------------------------...
[3 replies] Last: Have you used exceptions before? (by Pax)
|= Operator
 
Hi, I am using the following lines of code in my program: bool notOk = false; notOk |= (newMouse.x==40 && newMouse.y==12); notOk |= (newMouse.x>72 && newM...
[4 replies] Last: hello scotfang, | The bitwise-inclusive-OR operator compares e... (by coder777)
Inheritance + access mode
 
Hello every one, Pls tell me what is wrong with following code? I am not able to recognize. class A{ protected: int i; ...
[2 replies] Last: hello ShubhadaJS, private Class members declared as private can ... (by coder777)
data in class
 
Hello, can you help me explain this question? which different between protected, public, private, internal protected data in class?
[1 reply] : hello mp121209, private Class members declared as private can be... (by coder777)
Polymorphism
 
Hello there. I know this website has a great tutorial on Polymorphism, but I seem to have run into a bit of a problem. Basically I'm making a GUI using SDL. Tha...
[3 replies] Last: You should write a short test program where you just instantiate a but... (by kfmfe04)
array issue
 
Hi guys I have a code written output array Int b = {0,0,0,0,0,8,9,1,5,2,7,2} input array int a = {0,8,9,0,0,1,5,2,0,7,2,0}; int main() { ...
[5 replies] Last: I try as much as possible to use Standard C++ STL. Refer to http://www... (by sohguanh)
by qd11
inheritance, virtual methods, and overloaded methods
 
Hi, I'm trying to compile this simple program #include <iostream> #include <string> using namespace std; class base{ public: virtual int foo(in...
[3 replies] Last: Names in derived class hides names in base class. In other words, you... (by sohguanh)
Don't think my software if very good. (1,2)
 
I don't think my compiler is very good. I am using notepad, cmd, and a Borland C++ Compiler. I there a better (free) way to program?
[20 replies] Last: I would suggest Code::Blocks. Someone on this forum actually suggested... (by thepedestrian)
September 2010 Pages: 123... 20
  Archived months: [aug2010] [oct2010]

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