49,761 Topics
| |
I am now using Visual C++.net 2002 edition. My main ongoing project, an application that teaches the game of bridge, is now 350 K + llines of code, 95 % of which is application logic. The 5% dealing with GUI is just SDK for speed. I am just a retired … | |
Hi I want to have a variable that contains item number. int didn't work because i want to make the item number start with 3 or 4 zeros. if i use char * I can't increment the value of char? any help will be appreciated | |
Hello everyone, im not as totall a newbie in C++ but when times come to make a mini project for semester n started to make it , then i assume as im a newbie. (well im in 2nd semester) I m trying to make a project which clear most logic … | |
as the problem i'd met b4: [url]http://www.daniweb.com/forums/thread115104.html[/url] there's another problem looks like same with that problem, is about the logic of the int outq. this make the result1.txt always get unknown words after few loops. i'd like to know how to correct it. [code=cpp] #include <stdio.h> #include <stdlib.h> #include <time.h> … | |
i have a do while loop in my program. im just unsure of how to make it work. i need it to continue doing the loop until the error is between -0.1 and 0.1 i have this so far, i may have the greater/lesser than signs wrong, or just set … | |
Hey all, I am starting to work on a portprogramming project. I am not really sure where to go. I am trying simply blink an LED when it is hooked up to the serial port. Can someone give me a start on where to go. I have read several internet … | |
Hi I have a memory leak somewhere in this code but I have no idea where. Can anybody help me out ? [CODE] #include <windows.h> #include <mmsystem.h> #pragma comment(lib, "winmm.lib") #include <fstream> #include <time.h> #include <cstring> #include "resource.h" using namespace std; const char cn[] = "SameGame"; // ClassName HBITMAP BLUEBMP … | |
Hi all I'm new to this forum - Hope you can help me with my problem. First off all; I apologize for my poor english skills, i'm from sweeden I'm trying to make a simple phonebook by using a vector of struct's. As you can see in the code pasted … | |
Hey guys. I need some help on input validation in an array. The program can only input numbers but not characters. This is the code for the input. ( I know im a newbie lol ) [code=cpp] const arraysize = 10; float num[arraysize]; for ( int i = 0; i … | |
as the project given input1.txt and command1.txt to create result1.txt input1.txt: 1 C0A80001 8F22 C0A80002 0050 32D5B9C 2 C0A80001 8B05 C0A80002 0050 12D67B 3 C0A80001 CC08 C0A80002 0050 32D5B9C 4 5 6 C0A80001 C4A3 C0A80002 0050 34F1 command1.txt 1 output 2 output the queue length 3 idle 4 output 5 … | |
hi to all how could I use a mathematical operation on in c++. thats always bather me because i need it in my program. pls. help me. | |
Okay, figured that much out but I'm getting compiler errors on my object (which has data members from another object) [code] void statistics (int rolls[];int rollsize; int rollresults []) threedice tryerluk; rollsize=200; rolls[rollsize]; rollresults[16]; for (int i=0;i<201;i++) { tryerluk.rollem(); rolls[i]=tryerluk.getsumFaces(); }void statistics (int rolls[];int rollsize; int rollresults []) threedice tryerluk; … | |
I have got an assignment question : Constructors cannot be virtual , however destructors can. Justify the statement in reference to memory leak. Please help me out figuring the answer. | |
Suppose I know some indexes like 4, 7, 10,11, 13 and so on in sequence then I should put in dashes for the missing values like this: - - - 4- - 7- - 10 11 - 13 etc How do I program this? I know the indexes and the … | |
Hi, Can any one tell me where I can find information about data files? And I am trying to find answers for the following questions: Is there a specific structure for the data file that I use in C++? What is the best way to write a data file for … | |
I am having trouble creating an inverted half-square out asterisks. The problem requires three nested for-loops, I believe, but am unsure as how to proceed. Here is the work I have so far, with the UN-inverted half-square code in [I]italics[/I]. The inverted portion should be a simple manipulation of that … | |
Hello, I'm new here. I've been working on a card game program for some time now and I'm just trying to make it look appealing. I would like to try and find a way so that certain characters (heart, diamond, spade, and club) rotate in one position. What I mean … | |
This code is written inside a textBox event handler like this. What happens is that when you have written the word: "Hello" wich consists of 5 characters, this word will be selected, change color of "Hello" to blue, deselect the word and put the cursors position after the word Hello. … | |
I have a fully functional code below to read a textfile from a directory and load this into a textbox. What I have done is to put this code inside a comboBox control and what I am trying to achieve is when you select an item in the comboBox then … | |
I have my two classes built, one actually uses the other as a data member. Now I need to call that object to fill an array and don't know the syntax to do it. The two classes are in this thread [url]http://www.daniweb.com/forums/thread114985.html[/url] The function prototype looks like this [code] void … | |
Ok. I've redone my project from what I had before, and I still can't get the program to add interest and charges to the balance. Help would be greatly appreciated. =========================================================== This is what I have so far in my .cpp file and my .h file: Contents of Bbankaccount.cpp ===================== … | |
I'm trying to write some code that will read numbers from one file and put those numbers into a list and then print the list in another file. I'm having trouble trying to get the numbers from the infile to read correctly. The program compiles ok but when the list … | |
This is a very general question. I'm sure there is no "right" way so I thought I'd ask for opinions/common practice. In my file MainProgram.cpp (containing main()), sometimes I will have LOTS of functions. It seems very distracting to have a thousand lines of code all in the same file, … | |
I'm trying to create a parking lot system where users can enter and exit a lot. This lot should be kept on a file(s). My code compiles but my data doesn't write to the actual file. [CODE]void SYSTEM::parkProcess() { CARD IDcard; char lot; int id; string type; cout<<"Enter Parking Lot: … | |
please check out the following two code segments and suggest which one is more efficient and worthy to use... The segments are actually constructors used to allocate a memory block for a matrix.. segment - 1 : [code=cpp] class matrix { private : int rows, columns; int *element; public : … | |
Hey all. Hopefully this makes sense. I new to this C++ technique. I'm working on a project where a program will take custom html tags and convert them to openGL code that can be pasted in a C++ program. That part works well. My question is how do I take … | |
I have just joined your website. I am attending B.Tech in Computer science and have completed upto inheritance in c++. My first question here is: What is the relationship between inheritance and composition and why the two can be used in place of other. | |
I am not able to understand the following points in regard to difference between C and C++, 1.The comma operator can result in an "l-value" (a quantity that can be used for the left-hand side of an assignment) in C++, but not in C. 2.Enumeration constants (enum values) are always … | |
[code] #include <iostream> using namespace std; int fib(int n); int main() { int n, answer; cout << "Enter number to find: "; cin >> n; cout << "\n\n"; answer = fib(n); cout << answer << " is the " << n << "th Fibonacci number\n"; system("PAUSE"); return 0; } int … | |
I have a coming back problem that I dont know how to get out from. If you put this code in the event handler for a richtextBox control and write this on the First line: [COLOR="Red"]1234567890 [/COLOR]//This will turn red when you press 0 If you instead right away press … |
The End.