49,757 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
[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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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++ … | |
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++. | |
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 … | |
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 … | |
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()); … | |
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++ … | |
[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? | |
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 … | |
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... | |
[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", … | |
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 … | |
[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; … | |
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 … | |
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 … | |
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, … | |
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 … | |
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 … |
The End.