49,761 Topics

Member Avatar for
Member Avatar for vadan

hai plz help me Iam locking an object in a function fun1() and iam using that object in another function fun2() and unlockin it will the lock still holds good in fun2() the object is globally declared consider the following scenario [code] object obj; void fun2() { fun1(); obj.display(); unlock(); …

Member Avatar for Ancient Dragon
0
110
Member Avatar for gregorynoob

okay so i've got n and an array of n numbers, i have to go through all the three's of numbers like a[i], a[j], a[k] so that i < j < k and take the maximum of each such numbers (max of a[i], a[j], a[k]). my first guess is three …

Member Avatar for gregorynoob
0
169
Member Avatar for RayvenHawk

I'm having to create a program that uses a linked list to ask for X & Y points and stores them in a linked list and then displays those results. My problem here is when it gives me the output I only see the last 2 entries I've made. It's …

Member Avatar for RayvenHawk
0
276
Member Avatar for toolmanx

I am working with a MDI in my program. I use .cpp to compile although I program primarily with api's. I'm not sure whether that places me in C++ or Windows threads. Since using .cpp I have to obey C++ rules so I'll list my thread in the C++ area. …

Member Avatar for toolmanx
0
271
Member Avatar for sonicmas

I have a litle problem when i try to list Aluno = Student (option 4 in the program). i have other problem, when i try to save some Aluno(student using option 1) te program telll me that it is already created. Some one can help me? [ICODE] #include <iostream> #include …

Member Avatar for Ancient Dragon
0
115
Member Avatar for ankit7

hello everybody, Can anyone please tell how can i make C++ screen full in windows vista. thank you

Member Avatar for dmanw100
0
135
Member Avatar for kneiel

[CODE] class Base { public: virtual void fn(){cout<<"fn base\n";} virtual void myfn(){cout<<"myfn base\n";} }; class Derived : private Base { private: void fn(){cout<<"der\n";} void myfn(){cout<<"myfn Derived\n";} }; int _tmain(int argc, _TCHAR* argv[]){ Derived d; Base *p = &d; //Error: conversion from derived * to base * exists but is inaccessible …

Member Avatar for Alex Edwards
0
172
Member Avatar for coveredinflies

Hi, I have copied the quicksort algorithm out of my text book, but it isn't working properly and there are no compiler errors so I am struggling to debug. it is partially sorting so I think it must be one of the conditional statements or something not declared how I …

Member Avatar for Sky Diploma
0
123
Member Avatar for Asem1

hello everyone... can you help me with this assignment about hash tables.. I run the code on a linux machine and gave me errors.. here is the assignment and my code in attachment can anyone fix this please...I need to hand it today.. thank you all Asem

Member Avatar for Narue
0
98
Member Avatar for jyotis999

Hi All, I have a class of type class Row_Entry { public : //CString symbol; CString bid; CString ask; CString bid_size; CString ask_size; CString bmmid; CString ammid; CString type; CString exch; Row_Entry() { } }; I am creating a vectorlike this `std::vector<Row_Entry>RAW_ENTRY;` Now i have pushed all my required data …

Member Avatar for mahlerfive
0
222
Member Avatar for TTgheTT

anyone can help me? please problem: write a program that creates three processes and performs matrix operations at the same time. each process performs a different matrix operation. the program reads three matrices from a text file. the size of the matrix can be of any valid size. use two-dimensional …

Member Avatar for Salem
0
125
Member Avatar for Motlatjo Chris

Whats wrong with this code //--------------------------------------------------------------------------- #include <vcl.h> #include <fstream.h> #pragma hdrstop #include "MainUnit.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm1 *Form1; //--------------------------------------------------------------------------- __fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- void __fastcall TForm1::Button1Click(TObject *Sender) { //char *acc, *id, *sur, *bal; int col = 0; int row = 1; int …

Member Avatar for Sky Diploma
0
170
Member Avatar for tortoiseman

Hey everybody, I'm a little stuck on this simple program I'm trying to run. Right now it takes in a list of words and makes a single string out of them, but what I really want to do is make each word into its own new string, or maybe create …

Member Avatar for tortoiseman
0
89
Member Avatar for dmanw100

Are there any standard C++ libraries that support multithreading other than windows.h?

Member Avatar for kux
0
148
Member Avatar for tortoiseman

Hi everyone, This is my first post on the forum, although I've been coming here to find search for help for some time now. I'm taking a C++ programming class, and am having trouble with my most recent assignment. I'm not here for straight-up answers, just a little help. I …

Member Avatar for pr2008
0
122
Member Avatar for hobonator912

does any1 have any idea about how to,when i press a button,print out 1 line of text written by me and when i press it again another replaces the old? i already got the saving working so u dont have to worry about that

Member Avatar for Nick Evan
0
241
Member Avatar for Evan M

I'm creating a multiplayer game using winsock, but I've been having several problems with winsock. I've been searching for an alternative to it, but I haven't found anything. If anyone could point me to something I could use in place of winsock (a free something), I would greatly appreciate it.

Member Avatar for dmanw100
0
576
Member Avatar for atish00

Can anyone explain me pointers to 2D array ?? I have to input array of string using and read them in another function but I am having a REALLY TOUGH time with pointersan anyone explin it to me or refer good guide to pointers ?? I am using borlnd c++ …

Member Avatar for Salem
0
320
Member Avatar for TheGhost

hi I keep getting the segmentation fault thingie and i think i know the line that is causing the problem, but i dunno how to fix it. please take a look at the code. [CODE] ... class AnotherClass{ ... }; ... class AClass{ private: list<AnotherClass> listName; list<AnotherClass>::iterator it; ... public: …

Member Avatar for Sky Diploma
0
126
Member Avatar for timb89

How do you read and display a 2d array? the input text is below i just really have no idea of tried everything :( any sort of help would be appreciated [ICODE]* . . . . . . . . . . . . . . . . . . …

Member Avatar for Sky Diploma
0
99
Member Avatar for dmanw100

I recently completed a small console app that accepts input from the user and places it in a floating point array, which was implemented through a for loop. I have not spent much time studying error handling and was wondering if anyone could refer me to a useful error-handling tutorial. …

Member Avatar for dmanw100
0
100
Member Avatar for TheGhost

hello, how do i make both threads have access to the same set of updated data, when they call different functions? in addition, is the way i pass in the variable "myObjs" correct? can i pass in STL containers the same way? example: [CODE] ... class aClass{ ... }; int …

Member Avatar for Ancient Dragon
0
78
Member Avatar for ehsan_op

hello All, I am trying to write a multi threaded program in C++ , but it suddenly exits and i can not understand what happens , it actually do not get any error message or exceptions error , just get out of the program. need your help, thanks . [code=c++] …

Member Avatar for ehsan_op
0
142
Member Avatar for alpine89

Hey guys. After the great help i received with my previous thread of reading in a file, i thought id post up my next trouble. This is my code for my ISBN search function which works fine after the information has been read in to the 'book's. [code]int BookStore::findISBNRecord() { …

Member Avatar for ArkM
0
197
Member Avatar for alpine89

Hey guys. Im having some trouble with reading from a text file, into a class with strings and ints. Here is my code for my read file function: [code] ifstream infile; infile.open("books.txt"); if (infile.good()) { for (int i=0; i<=5;i++) { getline(infile, book[i].title); //string getline(infile, book[i].isbn); //string getline(infile, book[i].publisher); //string infile …

Member Avatar for alpine89
1
183
Member Avatar for zawpai

Hi, Could anyone explain me above error? [CODE=cpp] // friend overload + operator function #include<iostream> using namespace std; class Distance { private: int feet; float inches; public: Distance() { feet = 0; inches = 0.0; } Distance(float f) { feet=int(f); inches = 12*(f-feet); } Distance(int ft, float in) { feet …

Member Avatar for anilopo
0
381
Member Avatar for floros

Hello there, I'm trying to compile a project in Visual Studio 2005 and the compiler finds errors in the file fstream.h. Some of them are: c:\program files\microsoft visual studio\vc98\include\fstream.h(88) : error C2872: 'streambuf' : ambiguous symbol c:\program files\microsoft visual studio\vc98\include\fstream.h(89) : error C2872: 'streampos' : ambiguous symbol c:\program files\microsoft visual …

Member Avatar for VernonDozier
0
188
Member Avatar for cam875

Could someone give me a detailed explanation or give me a resource that explains something like how if I created my own custom 3D model that had 8 vertices would that be the same as saying 8 polygons because I always here talk about things like game developing companies throw …

Member Avatar for cam875
0
86
Member Avatar for Alex Edwards

Is there any real different between using an union between two types and a reinterpret_cast between two types, for example-- [code=c++] #include <iostream> int main(){ union{ unsigned short *a; float *b; }; float value = 0.6f; b = &value; std::cout << *a << std::endl; unsigned short *s; float *f; f …

Member Avatar for vijayan121
0
2K
Member Avatar for edouard89

I have the following code that when compiles with my test program gives me a segmentation fault, I hope you guys can help me with this. I am compiling on a gcc compiler using: [quote] g++ a3test.cpp screen.cpp dtio.c -lncurses [/quote] screen.h header file: [code=c++] extern "C" { #include "dtio.h" …

Member Avatar for Salem
0
127

The End.