49,761 Topics
| |
modularize program code by using functions. You will produce two solutions: a) using global access functions, and b) using classes and member functions. a) Using Access Functions Write five Invoice access functions: setInvoice(), computeAmount(), getAmount(), printData() and a global client function computeAmount(). Function setInvoice() has five parameters of types Invoice, … | |
Hello, i have a book that is teaching me the basics of c++ i understand most of it and its really fun, but i need some help creating my own applacation. i want to create a class caled bandit and have a sub class scout so that under bandits i … | |
Sorry, this is going to be a very long post :$ first of all, here is my codes: [b]Header File[/b] [code=c++] struct hardware { int record; char name[100]; int quantity; float cost; }; [/code] [b]Binary Input File cpp[/b] [code=c++] #include<iostream> #include<iomanip> #include<fstream> #include <cstring> #include "hardware.h" using namespace std; void … | |
Hi guys Im trying to make a maths game for a friend of mines little brother jase, but I need it to generate 2 random numbers between 1 and the maximum number that jase said. I cant figure out how to get the rand1 = (rand()%10)+1; so that the 10 … | |
i have an interest in boost/regex library - i need to extract url from a file ----> bookmark.html (from ie6) the regex demo programs use this library - but it is from 2003. when i try to run the program - i get an error: LINK : fatal error LNK1104: … | |
hi, I created a GUI using vc++ (without mfc). now I am told it needs to be used through a web browser, but I don't know how to do it. I have been told that one solution is turning it into an activeX control, but I have no knowledge of … | |
virtual void drive() = 0 What this means? void means no return value. drive() is a function but what virtual means? and why it asigns a value of 0 to a function?How can a function have value of 0 ? Thank you | |
Hihi.. I would like to ask about ::FindWindow's function.. I execute a program call ABC.exe.. I have coding like below.. HWND window = ::FindWindow("ABC", NULL); but I get the window value is NULL.. may I know what is my mistake..?? I had execute the ABC program, suspose it can return … | |
Hi, I am trying to read .ocx file using C++.But ,if I am using #import directive I am getting error like "catastrophic error".So,now I am trying to provide activeX control using ATL. Can any one tell me how to do this. Thanks& Regards, swetha. | |
Hi Experts, Please share your thoughts, it was asked to me in a job interview, I said I would remove "multiple inheritance" , but I was not prepared for the interview question. Your ideas please. | |
ok so yesterday i had issues with devc++ (where my code occasionally compiled) and when i tried to run the "compiled" program it says "source not compiled" (when really..i hit the compile button). So..i have now installed Visual c++ 2008, and i cant create a new project, it just says … | |
I need help with beginning code to simple game of hangman in C++ Don't know where to start and it is due in six hours. | |
what is ment by make file ,what is it used for ,is it a development tool? | |
I've been working on a project for a few days now, and I am running out of time by trying to research everything I am doing. My task for this particular program is to create an inventory program that reads from a file and then allows the user to manipulate … | |
I came to a point in my C++ book where I have to start using bitwise operators, such as &, ^, and |. I have a hard time grasping the concept of exactly how do I manipulate bits, the following example supposedly "turns off the 6th bit", therefore inverting the … | |
Hi to all, I woud like to know how to destroy only a child window?I am Using Dev-C++ WIN32 Thank you for reading.What message to do i need? | |
Hi, I want to count the number of characters of a string. Try to do it as follows. [CODE=cplusplus] int iSpace = 0; int iLength; string strTemp("This is a line of text"); iLength = strTemp.length(); cout << iLength << endl; for(int i = 0; i < iLength; i++) { if((strTemp.at(i) … | |
Hello, I've read in a book that APIs in the native APIs start with one of the two prefixes: Either Nt or Zw, so that the functions have names like NtCreateFile or ZwCreateFile. What does Zw stand for? It further says: [I]Both versions actually point to the same code in … | |
Hi i have a problem i can't see my menu. So thanks for reading. It is not finished but the compiler done it . So i wana test drive before complite it. File name Test1.cpp [code=C++] #include "resource.h" #include <windows.h> #include <winuser.h> /* Declare Windows procedure */ LRESULT CALLBACK WindowProcedure … | |
So after putting together this program, I am trying to sort multiple words alphabetically using [TEX]qsort ()[/TEX]. I have been using examples of [TEX]qsort ()[/TEX] found on the web and trying to adapt them to my cause, but all I've done so far is confuse myself. There are no errors, … | |
Hi to all. Can i make a Window,who have a power to be always active but invisible for me?How? | |
Please I'm new to this forum and I need a help with my code.I have written it all and compiled but it doesnt seem to bring any output(I'm reading the input from a file on my system).Please bail me out, I need to turn it in soonest [code=cplusplus] #include<iostream> #include<fstream> … | |
So I've got "m_starts" as a pointer to an int (int * m_starts;). And a const char * of "m_str". m_str = "bad,cold,new". How can I allocate "m_starts" to store the starting index of each word in m_str??? For loop? | |
I quickly made this program in DEV C++ and have a few errors, heres a little background info on the program, there is a program at my school that allows the teachers to spy and take over your computer whenever so I did a little snooping and found that the … | |
I am trying my first encryption program and I want to convert the letters to numbers then do an equation to change the numbers. Then when the encryption is done it should be a bunch of random numbers then the decryption should come back to normal (what the user input … | |
what is ment by merging a linked list do we need to sort the list after connecting the lists? please anybody help ..... | |
Hello, I was trying to work a problem from the book and decided to compile and run sample code that is already supposed to work. The problem is it doesn't. The concept of breaking these files up is new to me. Can someone please let me know what to do? … | |
Hi, I'm working in a 4x4 sudoku solver and i'm a beginner in c++. I use Microsoft Visual Studio 6.0 and windows xp professional Variables are: a1 b1 c1 d1 a2 b2 c2 d2 a3 b3 c3 d3 a4 b4 c4 d4 First i wrote that program [CODE] //sudoku.cpp: #include<stdlib.h> … | |
Hey guys ----------------- Truck t; Car c; Vehicle *broom = &c; broom->drive(); broom = &t; broom->drive(); ----------------- by saying Vehicle *broom = &c; what do you actually do ? what it means? *broom is a pointer located on c's adress in memory ? Is that right? thanks | |
I need to know how (if even possible) to return a substring without having to return a local variable or space allocated by new here's some code as an example as to what I'm looking for. [code] char* substr(const char* str, int start, int len) { char retSub[len+1]; int pos=start; … |
The End.