49,757 Topics
| |
In the following code, why x=new int; y=new int; are a must, if I comment out these two then I will have run-time error. I think I have int * x; and int* y; already shows that x and y are pointers point to int. There is no need to … | |
So I finally finished writing a program to build a maze using disjoint set (I just learned it =P). Anyway as I was writing my program, I was under the impression that I could start from the end of the maze and I could climb up to the parent node … | |
Hi, I'm trying to write a program using enum to store data. The user needs to input the first two letters of a word and the program outputs the full word. Here is what I have, but for some reason I cannot get it to run (visual c++ express edition). … | |
I have a homework problem that i am stuck on. I have to create a triangle (using classes) that a user inputs the height and width. It then translates 3 times and prints the coordinates each time it translates. This is what i have so far but am stuck. #include … | |
This is what i have done so far but i want the output like that square#1:not an increasing square square#2: increasing square square#3: not an increasing square please help Help with Code Tags C++ Syntax (Toggle Plain Text) [CODE]#include <iostream> #include <fstream> // Header to use input and output #include … | |
Hi: I have a MS Access file with the name "ItemsCat.mde. It is located at "c:\program files\ItemsCat" folder I need a C or C++ program (what ever it is) I don’t now the difference. I need it to do the following please? No#1- run my ItemsCat.mde file from this path … | |
I want to filter the global operator new and operator delete. For example, this could be used to count the number of times they are called and check at the end of a program to see if they match for memory leak detection or other purposes. I do know perfectly … | |
I'm creating a program to Deal, Sort, Display and determine cards for a poker game. A word for word of my program is here... [QUOTE]Write a program that will operate on a deck of 52 cards. Your program will: 1. Deal them into four random hands of 5 cards each … | |
Hello, I'm doing an analog clock windows forms application in Visual C++, and for this I need to draw a few lines in a blank space inside the form. I've searched the Net but can't find a simple way to draw inside a form window. Any Ideas? | |
Hi, I'm working on a c++ homework assignment and I cannot get it to work. Here is the assignment: Write a program that reads a student's name together with his or her test scores. The program shouuld then computer the average test score for each student and assign the appropriate … | |
hii everyone1.. how can i update a text file i,e only one particular record in a file i'm using openGL with vc++ ... my sample code to write into a text file when a store button is clicked is over here..after every 8sec i have to update only x_quad and … | |
Hi, do you know some good tutorial about WinForms to change data in table, when OCCI is used? I used google already. Thanks you very much | |
i am soryy my english is very bad but ill try my best to explain.i need help with my c++ assignemnt urgently. i want to create a frame and fit in this histograph(attached) which i made with the help of the container, where the x-axsis is the number from like … | |
Hi Guys, Im having issues with clearing an object of a class. Currently I have 2 lists [CODE]class People list<char> person[/CODE] [CODE]class School list<people> teacher[/CODE] i add the contects of person into people; i read by executing the printChar function created in People whilst iterating in the School list. [CODE]itr … | |
Hi for some reason my array prints out a bunch of 0's and other unwanted integer garbage. I can't see why because i originally assigned number to an array 1-31 using something like `array[]={1, 2,3...31}` something like that, and then i use a for or while loop in the code … | |
hello, im not understand concept of recursion function and the uses...have anybody explain to me... second how to write a recursive version of function to determine if an input is prime... | |
Hi i would like to know how i can navigate through a 2D doubly linked list. i have created a linked list of a linked list which are contained in classes Row and Columna Row list <char> X Column list <Row> Y; List X contains a b c d e … | |
mainly i have problem with the loops it's suppose to be a program that reads in data from a text file (not necessarily this one, but something like it): Monday Tuesday Wednesday Thursday Friday Saturday Sunday 34252 85776 65746 93453 63534 34335 0 20444 73462 83575 23552 23753 23532 0 … | |
Well, a few weeks ago, i messed up my PC ( The windows part, Linux remains perfect ), not big deal, just formated, and seeing the bright side, i updated to Windows 7 ( i was on Windos vista). Everything is perfect.... or was until now. I used to "compile" … | |
Is there a way to put a computer to sleep somehow other than clicking start, then sleep? I am using a shortcut to this right now: C:\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState 0,1,0 but it doesnt do the same thing as clicking "Sleep" in the start menu. I need a piece of C++ code, … | |
Hello, I am a non-cs student who has not really had any prior experience with C++ besides coding up a few simple programs on my own time. I am trying to implement the A* pathfinding algorithm and I have all of the logic figured out and written down in pseudo-code, … | |
Hi im very new to this but i am trying to write a progam that serves as a student database for a project at uni. Ive been stuck on this problem for ages now and can seem to spot the probably obvious mistake ive made. The code compiles but the … | |
I just want to ask if there's a site where I can download Savings.h header file, I just need it for my sample program, my Borland 5.5 dont have it and even Dev-C++. Thanks! | |
Hello, I need some help getting my program to read from a text file. Everything seems to be compiling fine but Im getting an error as soon as the program runs because, i believe, the information is not being inputted properly. Thanks for any help! [code] #include <iostream> #include <fstream> … | |
Hi, I have 2 backgroundpictures that I want to change every second in a loop. I beleive a backgroundworker and reportproress will work for this. But what I wonder is about these 2 pictures themselves. Normally you can compile a project with a one backgroundpicture put to the buttoncontrol but … | |
I have created 3 separate files but having issues with rationalnumber.cpp saying 'Rational' is not a class or namespace name. Any suggestions? Below is what should happen.....but I'm stuck thanks the RationalNumber class should overload the stream insertion (<<) and stream extraction (>>) operators. The stream extraction operator should prevent … | |
see this code with the queastion [CODE]#include <iostream> using namespace std; int main() { char str[30]; cout << "enter a word: " << endl; cin >> str; // if the user input: malaysia // so the output will be 3 because there are three charchter of 'a' return 0; } … | |
Ok i need to read in 2 files. The first file contains employee data, and second file contains employee ID# and the hours the employee worked. I need to matchup the ID numbers and add the hours, which i have done. my problem is if there is a invalid ID#, … | |
Hello new to the forum, I've been learning and working with C++ for a few months now and I've started to learn how to use strings. What I'm trying to do is take each individual line from a text file and dissect all blocks of text separate by a space … | |
Hello there! Expora here again. I'm trying to get the hang of functions now and I made a simple program to calculate percent but I don't seem able to get it to work I can enter the 2 numbers but when i get the results is something like 0041123f. Any … |
The End.