49,757 Topics

Member Avatar for
Member Avatar for coldkiller

This is 1 of my list of project to move a mouse pointer in result window without any help from the library,header file or built in function and using only your logics.Please help me and please tell something that is possible in Turbo C++(I know Turbo C++ is a old …

Member Avatar for Frederick2
0
307
Member Avatar for samipa

excuse me but i wrote this code for it could u cheek it pleaze [CODE]#include<iostream.h> int binarysearch (const int [],int , int ); const int arraysize=10 ; int a[arrayaize] ; int searchkey; for (counter=0;counter<arraysize;counter++ ) a[counter]=2(counter)+1; cout<< "enter your search key : " ; cin>> searchkey ;[/CODE] idont know what …

Member Avatar for tkud
1
85
Member Avatar for kamikazekazuo

Not sure what's wrong... I keep gettin this error and I don't know how to solve it... error C2065: 'AveXYZ' : undeclared identifier can someone help me please? //----------------------------------- #include "stdafx.h" #include <iostream> #include <cmath> using namespace std; //----------------------------------- float Display(int x, int y, int z); float ComputeAve(int x,int y,int …

Member Avatar for m_usman
0
251
Member Avatar for greko2009

Hello, I have a binary file of this format: 1st 2 bytes = total number of entries (This appears only once at the file beginning) Then each record is of the following format: 2 Bytes = Entry no. 2 Bytes = Entry category 2 Bytes = Description length n Bytes …

Member Avatar for greko2009
1
274
Member Avatar for William Byrd II

[December] 5. Greetings and salutations! My first visit here a few weeks ago was very helpful and friendly thanks to dkalita. I’ve been moving forward on my own since then, but it appears I have run into another dilemma. I have a short program listed below. It compiles fine. The …

Member Avatar for jonsca
0
106
Member Avatar for mrnutty

[URL="http://www.horstmann.com/cpp/pitfalls.html"]This [/URL] is a good read. Read it and learn from it.

Member Avatar for zortec
1
78
Member Avatar for mymyzzz

i have no clue how to sort using the array. it is not 2d. this is what i have [code] for(int i=1; i <=num; i++) { do{ cout <<"enter score " << i << ": "; cin >> scores[i]; if((scores[i] <= 0)||(scores[i] >=100)) cout << "invalid score\n"; }while((scores[i] <= 0)||(scores[i] …

Member Avatar for muzamal
0
234
Member Avatar for noofin

I have a very simple question, which I solved yesterday but forgot how I did it today! LOL So it is like this: I have a program written in C++ which in CMD writes: " Type your name to proceed"... And in the program i set a special name, and …

Member Avatar for Bench
0
91
Member Avatar for ayan2587

hi guyz... here's a pretty silly doubt that's been lingering fr a while.. why does the following code not work?? [CODE] func() { char *s; char a='x'; char b='y'; *s=a; s++; *s=b; cout<<s; } [/CODE] the program comes to halt inappropriately on running the above... can someone please explain the …

Member Avatar for jonsca
0
97
Member Avatar for new programer

HI all, First of all: I was reading about constant arrays in a book and I didn't really get the idea behind it's use or how it functions though I do understand that the values of the array items is not going to change .. help clarify this issue please …

Member Avatar for new programer
0
106
Member Avatar for JaredB

I hope this is the right forum to put this. I'm currently working on a project for school in which we need to read information from a file and then store it into an array of an object we create. The file is just a simple .txt file full of …

Member Avatar for ayan2587
0
78
Member Avatar for teddy78
Member Avatar for vmanes
0
59
Member Avatar for Towely

I'm currently working on a project that simplifies and adds two user-defined fractions. The teacher specified that we use a function with the prototype: [code] Fraction addfractions(const Fraction& f1, const Fraction& f2) [/code] My problem is, I can't find any information on this Fraction data type that he is making …

Member Avatar for rbrt13
0
997
Member Avatar for squigworm

Hello, I have been trying to figure this out for several hours and would so so so so greatly appreciate some help.. This is the error message I am receiving when I try to compile my program.. /Barclay_Colin_Assign7_Final.cpp:393: error: no matching function for call to 'bookinfo(int&, char [51], char [14], …

Member Avatar for lotrsimp12345
0
153
Member Avatar for .:Pudge:.

I have created a server and I can get it to send a simple message, but it needs to read the content out from the file (if it exists) and send the content back to the browser through socket. The reply needs to come with a HTTP header. Any help …

0
63
Member Avatar for Carrots

Hi, I have a program, which uses a vector to store some pointers. The program works fine. I'm trying to convert it to use a doubly linked list now though. At the top of the program I changed: [code] vector<Diary *>vectorname; [/code] to [code] #include <list> list<Diary *>vectorname; list<Diary*>::iterator i …

Member Avatar for StuXYZ
0
110
Member Avatar for K!nKy

Hey everyone, so I am having a really annoying problem with my code. The goal of it is to be able to read a text file of an unknown length (it's more or less a class roster w/ scores) and calculate and display the average of each student. The code …

Member Avatar for K!nKy
0
966
Member Avatar for BobRoss

I'm using [B]remove(inputPath.c_str());[/B] to remove a file after a while loop is completed, but the file remains. I'm using Vista and logged in as an administrator and the file is located in my home folder. Any help would be appreciated. Thanks in advance. [code=c] #include <cstdlib> #include <iostream> #include <fstream> …

Member Avatar for BobRoss
0
134
Member Avatar for xxunknown321

I am using jGrasp IDE and i'm having trouble with the compiler i keep getting this error ----jGRASP exec: g++-3 -g C:\Users\Joe\Documents\Downloads\testfile.cpp ----jGRASP wedge2 error: command "g++-3" not found. ---- This command must be in the current working directory ---- or on the current PATH to use this function. ---- …

Member Avatar for lbarowski
0
2K
Member Avatar for confusedndazed

Hello all!! I've been working on this code for a while now and I'm still lost. Can anyone tell me what's wrong with this code please??? I know Line 44 is missing something but I'm not sure what goes there, here is the pseudocode as well: /* pseudocode for Binomial …

Member Avatar for confusedndazed
0
114
Member Avatar for yatman

I have a structure type like the one shown below, I use it to store the output of my program and these structures are stored in a structure vector. Now I would like to print out the structures stored in the vector in ascending order of int Time_IF. struct Input …

Member Avatar for JasonHippy
0
96
Member Avatar for merse

-x means (0-x) or means (-1*x) because I want to overload operators, which one is necessary to overload if i would like to make -x understanable for the compiler? I have a user defined type: real and I have operator overloading: real operator+(real x1, real x2); I also have constructor …

Member Avatar for jonsca
0
115
Member Avatar for restrictment

Well, I am making a tic-tac-toe game, and I need a way to make it so when the person enters their name it adds a ".txt" to the end of their name. For example: What is your name? Robert *ifstream infoout("Robert[COLOR="Red"].txt[/COLOR]");* The .txt highlighted in red is what I need …

Member Avatar for Narue
0
104
Member Avatar for merse

I have to use a very simple data structure consisting only two double type data members (like complex numbers). I have written a class because it is practical to handle that object, and it is also usefull for me to overload all overloadable operators and define constructors and friend functions …

Member Avatar for merse
0
167
Member Avatar for Clockowl

Hey guys, I know the title isn't possible, but I'd like to here how you'd do it then. Suppose we have this code: [code=cpp] Class Foo {public: int x; }; //somewhere in the code.. int main() Foo one, two; one.x = 10; two.x = 20; Foo *a = &one; Foo …

Member Avatar for Narue
0
174
Member Avatar for merse

What is the compound assignment operator overloading syntax? I cannot find on the web. How can for example overload operator+= ? I know that it has to be a member function but what has to be its return value? reference?

Member Avatar for Narue
0
88
Member Avatar for aq5

Hey i recently got set a project to design a c++ connect four (four in a row) program on the console or using GUI. It only has to be Human vs Human, which is prolly sumthing a lot of you hav seen or done b4. I draw a blank with …

Member Avatar for Murtan
0
455
Member Avatar for Loner7

I'm working on a University assignment at the moment (a final assignment). I've normally been able to figure things out, but the teacher's thrown us a curve ball by making us use <fstream>. We've only had one lecture on it which covered [I]outputting[/I] a file, but nothing really handling taking …

Member Avatar for UberJoker
0
111
Member Avatar for BobRoss

I'm trying to finish up this little shift cipher I'm writing so I can encrypt the text files on my flash drive in case the drive becomes lost or stolen. It simply reads line by line from a plain text file, encrypts each line and outputs the lines to a …

Member Avatar for BobRoss
0
159
Member Avatar for theeurostick

In my code i got two compiling errors that i cant fix one is mared by (97) and the other is marked by (213) here is the code include <iostream> #include <iomanip> #include <string> #include <fstream> using namespace std; struct skater { string fName, lName; int entry; double score[5]; double …

Member Avatar for Lerner
0
241

The End.