51,593 Topics

Member Avatar for
Member Avatar for chaines51

OK. So, [URL="http://www.difranco.net/cop2220/op-prec.htm"]here[/URL] is a link to a table of operator precedence. At the bottom, it talks about the increment and decrement operators, saying that they have a high (the highest) precedence, but the actual action doesn't take place until later... so what good does the higher precedence do? Also, …

Member Avatar for vmanes
0
113
Member Avatar for luoleicn

Hi all I am trying to add GNU adns to my project, But ands thew an error "Assertion `ads->udpsocket >= 0' failed" after running for 10 minuntes. Anybody here met this before? I use ands as follow: [ICODE] bool DnsResolver::resolve(const char* domain, char ip[]) { bool result = false; adns_state …

0
46
Member Avatar for fadia

heey guys.. i'm trying to run this pro but i have one error.. can someone check it please. [CODE=language]#include <iostream> #include<cstdlib> void JOTAKU_LOGO (); //This function calls the flight agency's Logo. void ABOUT_JOTAKUAIR (); //This function displays a briefe history and information about J-Otaku Air. double DOLLAR_TO_YEN (double dollar_Z); //This …

Member Avatar for achied
0
364
Member Avatar for nustian

dear all, I have made a project in visual c++ and now i want to give a graphics user interface to my code. what is the easiest and effecient way to do so. Is there any software which can convert my code? reply.. regards

Member Avatar for William Hemsworth
0
49
Member Avatar for slawted

hello, first of all welcome, secondly someone please help me? this wont compile :( [code] #include <iostream> int main() { float pi; float radius; float area; pi = 3.1415926535; radius = 2; area = radius * pi; std::cout << "The area of a circle with a radius of 2 is …

Member Avatar for slawted
0
99
Member Avatar for meb111

Hi i would like to know, how can i get the color of a certain pixel on screen? Like when i am in a game and i press a button on the keyboard it will get what color it is in one specified pixel say... (100, 50) Thank you so …

Member Avatar for meb111
0
79
Member Avatar for Lukezzz

I have a little problem that my Form gets stuck when I run this first code. I have a lot of code in the event. The code runs fine but if I now will deactivate the form by clicking with the mouse on the desktop and again click somewhere on …

Member Avatar for Lukezzz
0
99
Member Avatar for themaster

Does anyone know how to give a GUI look to your C++ "Console Application". I cannot use Win32 API or any other template except the console application because I use Turbo C++ 3.0 IDE for development and I want my Application to be platform independent while using WIN32 API will …

Member Avatar for Ancient Dragon
0
295
Member Avatar for chaines51

I'm wondering if this is even possible in C++. Here's what I did in java a while back: [code=java] class Suit { public static Suit Hearts = new Suit("Hearts"); public static Suit Clubs = new Suit("Clubs"); public static Suit Diamonds = new Suit("Diamonds"); public static Suit Spades = new Suit("Spades"); …

Member Avatar for ArkM
0
171
Member Avatar for star34

Hi im working with linked list and i have to implement a function that deletes the duplicates of a number. for example if given 2 7 1 7 12 7 then the result should be 2 7 1 12 here is what I have: [code] #include <iostream> using namespace std; …

Member Avatar for NeoKyrgyz
0
114
Member Avatar for DonB

I'm using Borland's TurboC++ 2006 Explorer. I'm working on a class project, and have a program consisting of 3 files: [COLOR="Red"]Header (.h) Definitions (.cpp) Driver (.cpp)[/COLOR] [COLOR="Red"]Definitions.cpp[/COLOR] contains the typical [COLOR="Red"]#include Header.h[/COLOR] The program compiles and links correctly if [COLOR="Red"]Driver.cpp[/COLOR] contains the statement [COLOR="Red"]#include Definitions.cpp[/COLOR] The instructor doesn't like using …

Member Avatar for DonB
0
165
Member Avatar for Usura

how would i remove all the white space from an istream and replace them with "-" before producing an ostream?

Member Avatar for Ancient Dragon
0
791
Member Avatar for gnobber

I've read that the bits in a byte (in c++) are implementation or system dependent. What does that mean? Does it mean implementation of c++ or the processor architecture or some other thing? And I've read that you should use sizeof to determine the size of a byte? Could you …

Member Avatar for DonB
0
327
Member Avatar for Usura

Hey what would be the correct syntax for a vector of char* with a size of [2]? ive got it written like this.. vector< char* > myVector(); vector< char* > ::iterator myIterator; // reads in something myVector.push_back(temp); myIterator = myVector.begin(); cout << myIterator << endl; why does it cout nothing?

Member Avatar for William Hemsworth
0
98
Member Avatar for yun

I want to read and write string from file, - Dont want to overwrite on the existing file - Where to put the read file code as in Constructor if file is not created then it will generate error. help me to solve this issue. [code=cplusplus] class Security{ private: Map<string>password; …

Member Avatar for Stinomus
0
243
Member Avatar for OffbeatPatriot

I'm writing code to control a camera and I'm using boost threads to repeatly get the camera image and write it to a gui among a few other things while everything else runs. It's written with wxWidgets and it has a menu with an option to open/close the link to …

Member Avatar for Stinomus
0
125
Member Avatar for AbsoluteCPP

Suppose i have a class called [B]Vector3[/B] methods and attributes are defined in [B]Vce.h[/B] file, methods of this class are implemeted in [B]Vec.cpp[/B] file, now i want to distribute this class to my other xxx(what so ever), [B]What i want:[/B] 1.Allow them to see what methods and attributes are available …

Member Avatar for WaltP
0
101
Member Avatar for JackDurden

IF i have this function... [CODE] node* get_lowest(node* root) { node* min = root->child[0]; for(int i = 0; i<root->child.size();i++) { if(min > root->child[i]) min = root->child[i]; } cout<<"Here it is:"<<min->data<<endl; return min; } [/CODE] how do I get it to return the smallest indexed pointer? for example if root->child[0] and …

Member Avatar for VernonDozier
0
255
Member Avatar for mrcniceguy

i have just started learning C++,this is my first programming language. but i was solving some question in array,but this one was a problem to me. here it goes. create array,in that array find sub arrays(subset), in which there is a maximun number in increasing order. for example array below …

Member Avatar for mrcniceguy
0
115
Member Avatar for abhishekmadaan

Hi, I am making a program in which i need to append the file from the beginning. so i am opening the file like this wFile.open("sat.txt",ios::ate| ios::out | ios::in); moving the pointer to the beginning wFile.seekp(0,ios_base::beg); but when i try add data it is overwriting the data. Is there any …

Member Avatar for ArkM
0
98
Member Avatar for Lukezzz

I have made a form that contains about 60 buttoncontrols, 7 panels and 10 textboxes. What happens when I drag around this Form etc.. is that the controls flickers very much. How is it possible to reduce this flickering. Thank you...

Member Avatar for Lukezzz
0
80
Member Avatar for chaines51

I've always been curious: in VS, and most other IDEs, you are allowed to do something like this: [code=c++] //in file class.h class blah { //prototypes, members, blah, blah blah } //in file class.cpp #include "class.h" //method definitions... etc. //in file main.cpp #include "class.h" int main { //do stuff with …

Member Avatar for VernonDozier
0
118
Member Avatar for schnaiper

Hi I work on a anti-virus programm. The anti-virus program should start when you boot the computer. So I thought it is good to use a HKey to start it always. How can I make such a HKey which starts my program? thx

Member Avatar for schnaiper
0
73
Member Avatar for nonon

Hello guys! I just started learning c#.net. I able to make a simple report using crystal report. Now, my problem is I can't include data which comes from the textfields in the forms of my application. ex. I have value "alpe" in my textbox. and I want to include this …

Member Avatar for pupilstuff
0
132
Member Avatar for yun
Member Avatar for N3oblaster

Hi, Im new to C# and need help with my program that im writing i need to let it read an XML in the first window and when i press add program a second window opens (both windows i have) i want it to write the XML so something like …

Member Avatar for N3oblaster
0
236
Member Avatar for Mijchael

) Hi Guys, I am working now in a project that is placed into my docs\visual studio proj, that need to use . h files, placesd in c:\prog files\windows sdk and c:\prog files\OpenCv. Into these directories have another subdirectories with these .h that into them are included others .h files …

Member Avatar for Ancient Dragon
0
100
Member Avatar for ahspats

so my program has to read data from text file and pass it to the function. text file contains integer and string in every line. it looks like this: 23456 john 96512 martin 56985 wendy i've written it in C using this code: while (fscanf(filestream, "%d%s", &key, &value) == 2){ …

Member Avatar for csurfer
0
163
Member Avatar for aravasai

can any one please identify the mistake in my code??? my code is:: [code] #include<iostream> using namespace std; class Stack{ int *arr; int size; int top; public: Stack(){arr = NULL; top = 0;} Stack(int sz){ arr = new(nothrow) int[sz]; if(!arr) exit(1); size = sz; top = 0; } ~Stack(){delete []arr;} …

Member Avatar for Stinomus
-1
18K
Member Avatar for guest7

Hello, I am getting the follwoing error in my program: *** glibc detected *** free(): invalid pointer The program is as follows. [ICODE]int main() { operation1* sjob1 = new operation1(); answer* ans1 = sjob1->execute(); delete sjob1; operation2* sjob2 = new operation2(); answer* ans2 = sjob2->execute(); return 0; }[/ICODE] I have …

Member Avatar for Topi Ojala
0
204
Member Avatar for gretty

Hi I am making a rock, paper scissors game for fun & for practice. My problem is; I am trying to create a string by adding 2 character variables together. How do I do this? Do I use the insert function? Or something I think is called crstrt or something …

Member Avatar for jephthah
0
703
Member Avatar for bjanbkboi

I'm trying to read a file into a vector using structure...[CODE]#include <fstream> #include <iostream> #include <vector> #include <cstdlib> using namespace std; struct StudentRecord { int ID; char FirstName[30]; char LastName[30]; char Grade[1]; }; void read_file(char FileName[20],vector<StudentRecord> &students) { ifstream Students(FileName, ios::in); char S_ID[10]; /* char FName[30]; char LName[30]; char S_Grade[1];*/ …

Member Avatar for ArkM
1
108
Member Avatar for jazu100

Hi, to answer this question you need to have some experience about php... i'm planning to create a http server that supports cgi. Does anyone see the problem in C++ -source? Php doesn't give any output, but if I don't set the rfc3875 environment variables, all output comes normally (expect …

Member Avatar for ShawnCplus
0
846
Member Avatar for greg_mystikal

Hi, I am looking to create a C# application that when ran remains inactive (and hidden) untill I hang the mouse over something.. such as the 'My Computer' icon on my desktop (it will then display a message). Is this possible? If so, can anyone point me in the right …

Member Avatar for Diamonddrake
0
93
Member Avatar for vivek3227

Hi , Can ne1 tell me how 2 write a c++ program to find out the determinant of a (mxn ) matrix (need not to be square ).. If possible give me the code ,of some link whr I can find it ...

Member Avatar for siddhant3s
0
125
Member Avatar for clisen

Hey everyone, I'm relatively new to C++, cant seem to find a solution to my problem. I'm trying to randomly generate an array of class objects. I'm using rand() to generate a number 1-3, for the number of objects to generate. For some reason when I use: [code] int c_gen …

Member Avatar for clisen
0
185
Member Avatar for tintincute

Hi I'm designing a code where one can guess the Magic Number. In my code I have this part here where I declared the randomNumber after the class Form1. (the green mark below). Can somebody tell me what's the name of this part here? Is it static variable? And what …

Member Avatar for kvprajapati
0
79
Member Avatar for john_beginner

hello, i'm new to cpp & I wanna know that in C++ if there is multiple inheritance is done suppose, Class A & Class B public,protected member is inherted in Class C like, [code] class A { protected: int no1; public: void get_a(void) { cout<<"Class A"; } }; class B …

Member Avatar for indianapple89
0
109
Member Avatar for azjherben

I'm getting an error where it says I'm trying to use a null pointer. Then when I click ignore another error saying I tried to read or write protected memory. Any idea how to fix? [code] private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { using namespace System::Runtime::InteropServices; using namespace System; using …

Member Avatar for jencas
0
286
Member Avatar for unclepauly

im making a singleton class in c++ and have a couple of questions. first, heres my .h and .cpp files: [CODE] // Singleton.h class Singleton { public: static Singleton GetSingleton(); void DoSomething(); ~Singleton(); private: Singleton(); static Singleton* _instance; }; [/CODE] [CODE] //Singleton.cpp Singleton* Singleton::_instance = 0;// initialize pointer //********************************************************************************************* Singleton::Singleton() …

Member Avatar for jencas
0
2K
Member Avatar for luoleicn

Hi all: Can anybody tell my why this simple code which used pthread_cancel to kill another thread throws "terminate called without an active exception". Yes , I used google but what I found is not what I want. I want to kill thread at once so I use pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); …

Member Avatar for luoleicn
0
102
Member Avatar for timb89

10 marks Write a RECURSIVE function which when passed a string s will return true if s is a palindrome and otherwise false. A palindrome is a string which is the same if reversed eg radar, rotor, noon, racecar. past paper question which im doing at the moment as got …

Member Avatar for Stinomus
0
1K
Member Avatar for Kob0724

Hey guys, I have what I would consider a fairly unique problem. I'm not even sure where to start looking for a solution. I have template class that uses a typedef to define a map. But when I go to make an iterator for that map, I get a compile …

Member Avatar for siddhant3s
0
174
Member Avatar for eliza2044

Hey guys, I've been developing an application which transforms files generated by an aircraft transponder into KML files that will be loaded on Google earth. As these KML files are more or less XML files I'm trying to parse XML files. I have downloaded and the xerces library. According to …

Member Avatar for eliza2044
0
263
Member Avatar for snyp

hi, i am not really that good at c++. i have created an application which dynamically loads dll's as types of 'plugin' the problem i am trying to overcome is linking back to code in the application from the dll. i am currently within the scope of a function of …

Member Avatar for Ancient Dragon
0
284
Member Avatar for JaksLax

Here is my code: [CODE] #include "Poly.h" int main(){ Poly p; int degree = p.degree(); cout << degree << endl; int coefficient = p.coefficient(5); return 0; } [/CODE] [CODE] #include<iostream> using namespace std; class Poly{ public: Poly(); //constructor int degree(); //Returns the degree of the polynomial int coefficient(int); //Returns the …

Member Avatar for Stinomus
0
117
Member Avatar for JackDurden

Would someone be so kind as to help me with this insert. The function insert takes two numbers, num and num2. num is the number to insert in the tree and num2 is the number of children to the parent node where num is inserted. I am getting errors for …

Member Avatar for VernonDozier
0
107
Member Avatar for gretty

Hi I am studying for my C++ exam coming up & I have this practice question thats confusing me? [QUOTE]Given enum months{Jan = 1, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec}; write a C++ function that takes currentMonth of type months as the parameter, and returns …

Member Avatar for yun
0
173
Member Avatar for guest7

Hi, I have a c++ program which uses the api's of a utlitiy. As per the document I have to include the path of binaries for the utility in my code. I am not sure why that is required and how to inlcude that. Any help is appreciated Thanks

Member Avatar for guest7
0
108
Member Avatar for m24r

I am a newbie and want to build a excelchart from excel file in Borland C++. Can anyone helpme out. I have installed the excel components in my codegear project.

0
80

The End.