51,593 Topics

Member Avatar for
Member Avatar for Ace01000

This is my second attempt at a calculator, but my first at switch statements. I try to compile this, but i get a bulk of errors that make no sense to me, they all look rather similar, here is an example of the error: error C2784: 'std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,unsigned …

Member Avatar for Ancient Dragon
0
128
Member Avatar for binteron

I am new to C++ and working through SAMS C++ primer. one of the excercies involves creating a dynamic array of structures to catalogue car information. I have the following code almost working and I am sure that I am missing something really simple. The program compiles and runs as …

Member Avatar for binteron
0
164
Member Avatar for Bill Hughes

I am using VC++ 6 and MFC. I programmed a dialog box as modal I understood or misunderstood that once opened the user would have to supply the information before they continue using other applications. I believe if the dialog is opened from another application this is true. I am …

Member Avatar for WolfPack
0
182
Member Avatar for xfruan

I created a program that uses a friend function to access the private member variabls, it runs perfectly in Shedblood Dev-C++, but when i use Microsoft Visual C++ 6 to compile it, the compiler tell me that "the function is not allowed to access private members." Does this mean that …

Member Avatar for Narue
0
250
Member Avatar for thehakan

Hello; I have little experience in c++ and I should implement insertion sort algorithm using linked list. I wrote a working code however I should have use friends for having the list elements from a seperate class and use templates for sorting arbitrary data elements. Can anybody help me how …

Member Avatar for thehakan
0
149
Member Avatar for HelmsK85

[B]how to create a arry that stores the first 100 multiples of a user-supplied integer, prints the values forward and backwarf rom storage (in an array); prints any values that are multiples of a second user-supplied integer or a message indication that there are no multiples of tha number if …

Member Avatar for Salem
0
127
Member Avatar for huffstat

I have created a project in Visual C++ 6.0 called qcard4. This project was started by creating a new single document project and copying and pasting code from qcard3 into the files. I have been gradually improving and modifing this code from qcard1. I tried to produce the qcard3 code …

Member Avatar for Ancient Dragon
0
433
Member Avatar for DavidR42

I have been trying to get this C++ program to work for my class on a mortgage calculator. I am suppose to let the user enter the amounts for the principal, the term, and the interest. Also, I am suppose to let the user decide to do another mortgage or …

Member Avatar for DavidR42
0
160
Member Avatar for Tamir

Hi all, I wrote ([B]C++[/B]) an addIn for ms-word and [B][U]I wish to add an "Options" dialogBox[/U][/B] with tabs to it. Ms-word uses the [B]bosa_sdm_Microsoft [/B]class for the "Options"-dialogBox. I wish to add such a dialog (window) to my addin. I use GetProperty(..."Windows"...) and CallMethod(..."Add"...) with variant variables in order …

0
67
Member Avatar for SegFaultSoul

Hi all, I'd like to get started programming Windows, but not sure how to go about it. I've only really worked with Java (in terms of OO programming) up until now. Will most Windows programming be done using .NET from now on? I mean, will any of the .NET languages …

Member Avatar for Ancient Dragon
0
176
Member Avatar for jbuzz120

Hey Guys and Gals I am new to this site and new to programming. C++ is the first one I am trying to learn. I ran into a problem on one of my assignements. I believe my problem is in the actual calculations. The Bonus part of the program is …

Member Avatar for Rashakil Fol
0
518
Member Avatar for fishman44

Please help a newby trying to code first program. I want to be able to write data to a file, then read from the same file. I can manage this OK, but If I set-up a loop to do the same procedure again I get an error message telling me …

Member Avatar for WolfPack
0
167
Member Avatar for nanodano

I have been writing some CGI scripts in C++, and I was wondering if anyone else has done the same? I have built a pretty decent sized library of functions I use a lot for formatting form inputs and such. The reason I chose C++ is because I'm so familiar …

Member Avatar for Rashakil Fol
0
496
Member Avatar for Drowzee

This is an offshoot of a specific problem I've posted in the C# forum. However, it applies to C++ as well. If you have opened a file, specifically, an image file, but would like to rename (or, as MSDN says, 'move) the directory the file resides in, what are the …

Member Avatar for Drowzee
0
438
Member Avatar for Alphabetized

Hey everyone, im new at c programming, i was gonna do c++ but there was no c++ book at my library lol. Anyhow, i notice that all the programs I write open up in DOS, and my book doesnt say nething on how to change this. Im using Dev c++ …

Member Avatar for ~s.o.s~
0
135
Member Avatar for cocojim

what is wrong with the following simple code? [code] int *n; int a=1; n=&a; cout <<"n="<<*n<<"\n"; [/code] It compiles, but print out "Bus Error". I am compling this code under Mac OS X, Unix shell, g++.

Member Avatar for WolfPack
0
32
Member Avatar for cocojim

Rookie Disclaimer. I am confused about what is the difference between: A: char *p="string"; B: char q[10]="string"; For A: I can do "p++", which gives a pointer points to "t". But I cannot do command like "strcat(p, " test")", for example. For B: I can do "strcat(q, " test")", but …

Member Avatar for WolfPack
0
231
Member Avatar for gpcdon

Hello, I have been asked to use Microsoft SDK 5.1 to enable voice commands in a program. After installing the SDK I am using the Reco sample program. I am using a vocabulary which I have created. Reco recognizes this vocabulary and is working fine. For the program I need …

0
54
Member Avatar for ~s.o.s~

Hello to all progg. out there. The sample prog. i have written is of which i am facing three doubts : [CODE] char *someFun1() { char temp[ ] = "string"; return temp; } char *someFun2() { char temp[ ] = {'s', 't','r','i','n','g'}; return temp; } int main() { puts(someFun1()); puts(someFun2()); …

Member Avatar for WolfPack
0
122
Member Avatar for ~s.o.s~

Hello to all coders out there. I have a doubt regarding the format "long double" which is producing wierd results when used in the case of a factorial program. When "long double" used with C lang. produces the output input = 3 factorial = -2.000000 while when used with C++ …

Member Avatar for WolfPack
0
249
Member Avatar for Acidburn

[code] typedef struct Cell { int north,south,east,west; int RD; bool visited; } Cell_Info; Cell_Info a[100]; [/code] this doesnt seem to want to dereference ..when i type a[0]. i get an erorr instead i should have a list of attributes that are instide the structure...Any ideas?

Member Avatar for Dave Sinkula
0
111
Member Avatar for Woobag

Hey im trying to make a function that you can pass two values to, a RANGE_MIN and a RANGE_MAX, than generate and return a random number between those two numbers. My first section of code repeats the same number every time i run the program (unless i change something and …

Member Avatar for Rashakil Fol
0
190
Member Avatar for Woobag

Im used to programming in Java as it was my first language to learn. In C++ is... [code]int myFunc(void);[/code] equal to [code]int myFunc();[/code] I was doing a number of tests, but the answer was still unclear...

Member Avatar for Drowzee
0
153
Member Avatar for kahaj

[code] //Unjumb #include <iostream> using namespace std; char *arraynonjum [250] = {"BRIDEGROOM", "CEPHAS", "CLAY", "BLESSING", "NAZARETH", "BLOOD", "DORCUS", "EPAPHRUS", "DAMASCUS", "EDOM", "BOAZ", "JERABOAM", "CELESTIAL", "CHILDREN", "COVENANT", "TEMPLE", "BAPTISM", "EPHESUS", "AARON", "MOSES", "KEDAR", "COMFORTER", "ISHMAEL", "STONING", "COMPASSION", "CROWN", "NEBUDCANEZER", "EPHRAIM", "JORDAN", "CAIN", "NINEVAH", "EZEKIEL", "CHARIOT", "INCENSE", "WISDOM", "EDEN", "ESTHER", "NEHEMIAH", "ABIMELECH", …

Member Avatar for Dave Sinkula
0
179
Member Avatar for bibo1978

hi, well my question may be very basic but can u help me I have a buffer that including my data which is binary data and I want to use the iostream to handle the buffer read/write, seek ... etc, I am using the strstream to do this, by setting …

Member Avatar for bibo1978
0
246
Member Avatar for Nedals

[code] #include <iostream> #include <string> using namespace std; struct record { string C0; string C1; string C2; }; int main() { record param; param.C0 = "heading1"; param.C1 = "heading2"; param.C2 = "heading3"; string key = "CO"; string data = param.C0; cout << "DATA: " << data << endl; return 1; …

Member Avatar for Nedals
0
205
Member Avatar for server_crash

I have the following simple piece of code: [code] double new_amount; printf("Enter an amount: "); scanf ("%d", &new_amount); [/code] For some reason, it always give me zero as the new_amount no matter what I input. What exactly am I doing wrong? Also, is there a way I can do a …

Member Avatar for WolfPack
0
850
Member Avatar for nsan

some easy questions about c++ 1. is it possible to link the c++ files with databases like oracle,MySql? (coding the file to access the databases) 2. can we put the compiled files on websites? Google.com is build in C and C++ and their search engine is running on that. how …

Member Avatar for iamthwee
0
221
Member Avatar for Umm...

Hi Im working on a c++ project that requires me to have a simple winsock client server program but the only thing is that it needs to be non blocking. Now this wouldnt be a problem except that im creating this for a windows console application. I also want to …

Member Avatar for Ancient Dragon
0
103
Member Avatar for costantinos

hello i am stuck at an IO problem and i need some help. I need to read a file that i have but i want to parse it char by char and store the contents in an array. in order to explain i have a file which has two columns, …

Member Avatar for costantinos
0
130
Member Avatar for freemind

Hi everybody! I recently wrote a little simulation program, that simulates a real-time elevator system with 3 elevators. Since the code is around 530 lines I presume it is not a good idea to paste it here. There is some number of minor flaws of logical type and I would …

Member Avatar for Rashakil Fol
0
273
Member Avatar for yuelabtina

If we don't know the size of the array before running, usually we use the dynamic allocation. My question is when I already define and allocate memory for a pointer to two-dimensional array, may I directly use the array expression A[i][j] to this pointer as I showed as following? Borland …

Member Avatar for Dave Sinkula
0
153
Member Avatar for yuelabtina

Hi, I wrote a class WAVELET1 in borland c++ 6.0 environment. And used this class member function in another file. It always said there was error when compiled. The error messages were as followings, [QUOTE] [C++ Error] wavelet.h(6): E2238 Multiple declaration for 'WAVELET1' [C++ Error] wavelet.h(6): E2344 Earlier declaration of …

Member Avatar for yuelabtina
0
239
Member Avatar for Woobag

Ill put my code at the end, as not to scare off anyone from reading on past the code (as if something so simple could scare!) I basically wrote this tonight. I have been working on my C++ skills, specifically in the way of learning newer concepts...such as implementing OOP, …

Member Avatar for Ancient Dragon
0
252
Member Avatar for ganesh_i

Hi! I have a C code of 1800 lines. I want to use this code to make a DLL in Visual C++. I am novice in using VC++. Can you please tell me how to do it? Is there any guidance available on the net for writing DLLs in VC++?

Member Avatar for Ancient Dragon
0
89
Member Avatar for wawankot

Dear All, I have alot of old funtions that have 'FILE *' as passing parameter. Now I am using Compound File...It use IStream. Does anybody know how to convert IStream to FILE* ? Thank's

Member Avatar for wawankot
0
87
Member Avatar for dev.cplusplus

Hi, to all I know this was ask before, but in the Post you say search in Google, I did and I didn't found what I'm looking for. How to connect to SQL Server from C++ code? I found the tutorial: [URL="http://www.codeproject.com/database/sqlconnect.asp"]http://www.codeproject.com/database/sqlconnect.asp[/URL], and is working and is very good, but …

Member Avatar for Ancient Dragon
0
166
Member Avatar for angle188.shroff

Hi I have one opensource of vc++. While executing this code it is giving the following errors. 1)error C2433: 'HWND' : 'inline' not permitted on data declarations 2)error C2143: syntax error : missing ';' before '{' 3)error C2447: '{' : missing function header (old-style formal list?) 4)error C4430: missing type …

Member Avatar for Dave Sinkula
0
474
Member Avatar for brale

J don't know how to detect mouse click and how to get cordinates of mouse pointer in the moment of click? J need functions that detect mouse click on console.

Member Avatar for brale
0
112
Member Avatar for Mamata

Hi, I'm not a beginner in C...I'm more used to C/C++ programming through Microsoft visual C++ rather than Simple compilers such as TurboC. Now I've loaded TurboC in my home PC so that my brothers get started with C programming... But we are not able to compile any program... Error: …

Member Avatar for WaltP
0
153
Member Avatar for BronxBoriqua

I want to learn C+ but i want to start with a simple compiler. I have access to Borland C++ and Visual studios.net but they are way to overwhelming. Can some body give me names of decent simple programs that I can learn with.

Member Avatar for jetru
0
147
Member Avatar for isaacmacdonald

I'm using the latest VS C++ express edition for a basic intro to c++ class that is largely focused on numerical applications. Anywho, for whatever reason, I'm getting strange behavior from scanf("%c",&whatever). The program is supposed to use switch to perform some operations on input integers, but way before I …

Member Avatar for WaltP
0
108
Member Avatar for ghadahelal

hallo i want 2 know if there is a function that reads from an input file and after reading this char will disapear. i mean the read char will b disappeared.

Member Avatar for Ancient Dragon
0
217
Member Avatar for CharlesTeck

I am using a list template from the STL in BorlandC++ Builder and have a problem in that I can't get it to release the memory it uses once I reduce the size of the list. The documentation states I should do the following: [code] // Remove data from the …

Member Avatar for Salem
0
192
Member Avatar for CharlesTeck

I am having a problem with a StringGrid in BuilderC++. The help file says that the RowCount and ColCount manage the size of the StringGrid. My problem is that it only consumes more memory and never releases any memory, even if I set the RowCount and ColCount to 1,1. I …

Member Avatar for CharlesTeck
0
170
Member Avatar for johnray31

hello friends, as i know header file contain the declaration then in which file they contain implementation/initialization and where these files are put in turbo c++ compiler i am able to see header files declaration but where is implementaion/initialization file is they are put in same directory with same name …

Member Avatar for johnray31
0
197
Member Avatar for startspark9

im using the borland turbo c++ compiler. I have it installed correclty but when i try to run the basic "hello world" program i get this "warning w8065 call to function 'Printf' with no prototype in function main" i would greatly apprieciate it if some one could tell me what …

Member Avatar for John A
0
154
Member Avatar for molayos

How do I pass a file to post instead of message The url i am posting is IP:PORT/app/server/recieve. How do I pass /app/server/recieve in the following program? struct sockaddr_in { (short int sin_family; unsigned short int sin_port; struct in_addr sin_addr; unsigned char sin_zero[8]; } struct sockaddr_in their addr; their_addr.sin_family=AF_INET; their_addr.sin_prot …

Member Avatar for kris.c
0
95
Member Avatar for gorgonzola357

I'm just starting to learn C++, so bear with me please. I've started with a a simple example problem copied out of a book, and I've checked and re-checked several times to make sure the code is identical. The code is: [code]#include <iostream> int main() { int x = 5; …

Member Avatar for gorgonzola357
0
84
Member Avatar for iamthwee

Ok basically, I'm trying to sort by class definition in c++. For example I have a class:- [CODE] class crap { private: string word; int word_length; ...[/CODE] Which gets words from a list and then sorts them by word length or in alphabetical order. However, I couldn't find anything useful. …

Member Avatar for iamthwee
0
234

The End.