49,761 Topics

Member Avatar for
Member Avatar for Darkmeerkat

Hello, I've got three files, [b]main.cpp[/b], [b]test.h[/b] (the header file), and [b]test.cpp[/b], (implementation of [b]test.h[/b]). Both [b]main.cpp[/b] and [b]test.cpp[/b] #include [b]test.h[/b], but I don't seem to be able to get [b]test.h[/b] to use the implementation in [b]test.cpp[/b] (leading to "undefined reference" errors when attempting to compile). Searching Google, I've found …

Member Avatar for Darkmeerkat
0
93
Member Avatar for hanabyha

i have to make a program for cinema management system. here i include the question and the source code that i've made before. question: ---------------------------------------------------------------------------- [COLOR=black]. Students are required to design a Cinema Management System program that can perform the following functions (this program should depict the online system of …

Member Avatar for iamthwee
0
195
Member Avatar for HelmsK85

A farmer has a bunny farm. He has cage capacity for a limited number of bunnies. A pair of adult bunnies will give birth to 2 bunnies (1 male and 1 female) at the end of every three months. A bunny is an adult when he or she reaches the …

Member Avatar for Dave Sinkula
0
202
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
124
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
158
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
180
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
247
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
145
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
121
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
428
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
158
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
169
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
515
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
165
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
478
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
433
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
125
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
30
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
224
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
119
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
240
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
106
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
185
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
151
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
178
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
243
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
203
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
216

The End.