49,757 Topics

Member Avatar for
Member Avatar for wildplace

let say, i have a House object; House* someHouses = new House[100]; -----fucntion call... may or may not add stuff to someHouses ------ now, i want to get to the last position that haven't used yet. i tried to check NULL, and 0, both doesn't work. how can i check …

Member Avatar for mrnutty
0
5K
Member Avatar for Labdabeta

Is this a viable BIGENDIAN test: [CODE]int tmpvaluethatwillneverreallybeused=1; bool bigendian=(*(char*)(&tmpvaluethatwillneverreallybeused)==1); void myFunction() { if (bigendian) { //do big endian specific code } else { //do little-endian specific code } }[/CODE]

Member Avatar for rubberman
0
150
Member Avatar for SumPersonGuy

Basically, the assignment is to create a huge integer class by using a singly linked list, wherein each element of the linked list holds one digit of the number of the huge int. I only have to do addition and multiplication, and addition works. Multiplication *should* work, as far as …

Member Avatar for tungnk1993
0
156
Member Avatar for aparichit4evr

Hello friends...I'm having confusion about binary operator overloading in the following program. The question goes like this. Qn. Create a class time with two member variables as hours and minutes of integer type,write default,parameterized and copy constructor. Overload necessary operators to compute T3=5+T1+T2, where T1,T2 and T3 are time objects. …

Member Avatar for tungnk1993
0
276
Member Avatar for senergy

Hello, about 3 months ago I made simple chat using MySQL++ which is working fine, login function: [url]http://pastebin.com/Mdup4zi6[/url] but today I'm creating Control Panel, I've copied and changed this function a little bit, but i'm getting 0 results (if I copy syntax to navicat I'll get password so...) login function: …

Member Avatar for senergy
0
105
Member Avatar for suneye

Hello, I am trying to read data from a file and make each saved item in the file an option on the combobox so that the user can select whatever he wants .The problem is in adding items to combobox not in reading from file .can anybody help me plz …

Member Avatar for Ancient Dragon
0
150
Member Avatar for Ahmed2

Hi guys, the title says it all, I have produced list of numbers from a c++ program into an excel file, and I want to make a CDF graph out of it. What I know is that I need to find numbers greater than zero, then number greater than one …

Member Avatar for deceptikon
0
615
Member Avatar for Karlwakim

Hello everybody, I am still learning c++,I already know about objects, classes, pointers and i can use them. I wanna move to game development, but should I go further in console apps before moving to game dev ? Please help me because i am 14 years old and i would …

Member Avatar for jbennet
0
88
Member Avatar for ICTGUY

hi.. this is part of an assignment.. but any help will be greatly appreciated F(0) = 0 where F(z) is a linear polynomial of order n with complex coefficients F(z) = A(n)Z^n + A(n-1)Z^n-1 + ... + A(1) Z + A(0) = 0 this hasent formatted very well.. it's A(subscript …

Member Avatar for ICTGUY
0
319
Member Avatar for squinx22

hi! What is makefile? How does it work? Is it done in the terminal? I am using Unix OS

Member Avatar for palashjhabak
0
156
Member Avatar for picogenkaku

Good day to everyone. I have this trouble of stopping the timer at a specific time, say I have to stop the timer at 1:30. When I try to run it, it doesn't stop. Please help. Here's my C++ code. [CODE] #include <iostream> #include <time.h> using namespace std; void wait …

Member Avatar for picogenkaku
0
236
Member Avatar for The_Purple_Mask

I am using a priority_queue-s for implementing A* and Dijkstra's algorithm. Is there a point writing my own heap for time optimization? How faster would it be? I read in wikipedia that Fibonacci heap will be the best. Do you agree?

Member Avatar for mike_2000_17
0
256
Member Avatar for mrmodest34

Greetings, this is my first post here but I will try to do it correctly. I know this specific question is a common one, but I am not looking for someone to do it for me, I just need someone to help me out a little. I understand the basics …

Member Avatar for mrmodest34
0
232
Member Avatar for jeyjey223

i watched this tutorial video [url]http://thenewboston.org/watch.php?cat=14&number=13[/url] and for some reason it doesn't work.. it says time is undeclared for some reason [CODE]#include <stdio.h> #include <conio.h> #include <stdlib.h> int main(void) { int i=0; srand(time(NULL)); while (i<200) { printf("%d\n", 1+rand()%6); i++; system("cls"); } system("PAUSE"); return 0; } [/CODE]

Member Avatar for deceptikon
0
103
Member Avatar for phorce

Hello :) (Too many questions about this)! Basically, I'm trying to display the contents of a matrix without using "cout" in my class. (It's a bad method) I've tried to return an array, but, that failed miserably.. So I've got a method in my class: [code] double Matrix::read(int theRow, int …

Member Avatar for ravenous
0
116
Member Avatar for MasterHacker110

I have been programming in C++ for a while now. I heard about RSA Encryption algorithm, and i have read many online sites on how it works. But i still cant grasp how the algorithm works. i have tried to make programs with RSA, but they doesnt encrypt. If you …

Member Avatar for Moschops
0
325
Member Avatar for mikeshadow

I have this assignment where i have to create a program that executes another one, and it can terminate it, see how much ram it uses, and runtime. i have tried using system(); but it doesn't enable me to terminate the program after a set duration of time.. Any help …

Member Avatar for gerard4143
0
68
Member Avatar for radiat

I'm studying enumeration at the minute and i've a quick question. In the following code using enum, are you limited to ouputting the sequence number of the possible values, or can you use the enum operator to output the text "green"? [CODE] #include <iostream> #include <sstream> #include <fstream> #include "conio.h" …

Member Avatar for Ab000dy_85
0
180
Member Avatar for general07z

Hello, This code is for (hospital management system). This code allow you to add patients. There are two types of patients. which is: 1. Normal patient. 2. Critically ill patient. once you added any patient. You will be able to show all patient using "ShowAllPatient;" method. -> i want the …

Member Avatar for WaltP
0
2K
Member Avatar for phorce

Hello, basically I want to return an array from a function (So I don't output things in the class - just main) But I seem to get the error: "invalid types 'int[int]' for array subscript" Here is the code: [code] #include <iostream> using namespace std; int matrix() { int matrix[10] …

Member Avatar for phorce
0
198
Member Avatar for sinatra87

I normally don't try to get outside help on homework that is still due, but I've kinda' hit a wall on this one. I'm trying to write a program that dynamically creates a list of scores for a group of students. It has to ask the user how many students …

Member Avatar for sinatra87
0
245
Member Avatar for Dhananjay_1976

what if i want to find out the age or period laps between certain dates for a database of 200 persons. for example: 1- aaaa dob: 12-12-1983 2- bbbb dob: 01-04-1980 i want to get out put as aaaa's age on 01-01-2012 is xx day, xx months xx years and …

Member Avatar for Ancient Dragon
0
74
Member Avatar for phorce

Hello.. I'm doing a project that involves searching/matching 2 matrix's. The basic idea: Matrix 1: 0 1 0 1 0 1 0 1 0 1 1 1 1 0 1 Which will then be interpreted in memory as: 0 1 0 1 0 1 0 1 0 1 1 1 …

Member Avatar for mrnutty
0
105
Member Avatar for alexbnc

I want to get the information downloaded from a file (a BMP image) into a char array. I have this function [CODE] #define _countof(x) (sizeof(x) / sizeof(x[0])) char* DownloadBytes(char* szUrl) { HINTERNET hOpen = NULL; HINTERNET hFile = NULL; char* data = (char*)""; DWORD dataSize = 0; DWORD dwBytesRead = …

Member Avatar for alexbnc
0
332
Member Avatar for skannigan

Hi, just a quick question. if i have an input file with 6 lines of data. for example(ingnore the numbers 1 to 6, they indicate the file number and is not part of the file physically) 1. Peter 3 / + - * 2. Dahne 8 + - / * …

Member Avatar for Ancient Dragon
0
207
Member Avatar for swissknife007

[CODE] #include <iostream> #include<stdio.h> #include<string.h> using namespace std; int main() { // cout << "Hello world!" << endl; int t,i,j,a,flag; char str[1000001]; cin>>t; while(t--) { a=1; scanf("%s",str); for(i=0;i<=strlen(str);i++) {flag=0; if(!isdigit(str[i])) {flag=0; for(j=i-1;isdigit(str[j]);j--) { if(str[j]!='0') { flag++; a*=str[j]-'0'; //cout<<"flag"<<flag<<" "<<a<<"A"<<endl; break; } } if(flag==0) { a=0;break; } } while(a>9) { if((a%10)!=0) …

Member Avatar for StuXYZ
0
517
Member Avatar for zekstein

I need some help here.. I need an example to do that : ( a background task ) #includes blablalbalbla void?? ExecuteTask () { while(1) { cout << "first " << endl; } } int main () { ExecuteTask( ); while( 1 ) { cout << "lol" << endl; } …

Member Avatar for zekstein
0
186
Member Avatar for jp071

Hello, I am doing simple read/write program for serial port. I am faceing a error that i donĀ“t understand. Error is: "error C2664: 'CreateFileW' : cannot convert parameter 1 from 'const char [5]' to 'LPCWSTR' " My whole program: #include <windows.h> #include <iostream> #include <string> using namespace std; void set_com_pin(bool …

Member Avatar for zeroliken
0
2K
Member Avatar for triumphost

Is there any C++ .Net IDE's around? I mean visual studio is ok.. it just isn't as good as SharpDevelop which only does C#, VB and a few others. It doesn't do C++ that's why I'm looking for a C++ version of SharpDevelop. Any Ideas? SharpDevelop [url]http://www.icsharpcode.net/opensource/sd/[/url]

Member Avatar for thines01
0
388
Member Avatar for jonnyboy12

Hello all, i working on a server I have realized that it only is using the loop back address of my ip. It looks like this. [CODE] struct sockaddr_in from; int fromLen = sizeof(from); SOCKET msgSocket = accept(listenSocket, (struct sockaddr*)&from, &fromLen); if(msgSocket == INVALID_SOCKET){ cout<<"Error at accept: "<<WSAGetLastError()<<endl; closesocket(listenSocket); WSACleanup(); …

Member Avatar for BobS0327
0
208

The End.