49,761 Topics
| |
How you got any examples of programs which communicates by PS/2 ports to mouse etc ? | |
I need help coding a npc interaction using a gui including buttons and an exit option. | |
this is the error i'm getting. g++ main.cpp g++ universityperson.cpp /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../crt1.o(.text+0x18): In function `_start': : undefined reference to `main' collect2: ld returned 1 exit status make: *** [universityperson.o] Error 1 I'm not going to post all the code i have but here is my makefile main file and universityperson files … | |
I'm making this snake game, and I've created a class to handle the snakes (players and AI snakes), this works out quite well, however, at the moment I'm declaring my main snake (player 1), as global, in terms of: [CODE] class Snake { //... Lots and lots of code. } … | |
My program dynamically allocates memory to an array of objects : [CODE] class particle { public: int x[D],shifted,ID; particle() { shifted=0; ID=-1; } }; // Array of all the particles particle* particles; int main() { for(a=0;a<s_num;a++) { particles= new particle[num]; //some code ........ ........ for(i=num-1;i>=0;i--) { delete (particles+i); } } … | |
plz send me a passward protect code in c++ (visual stodio) if i inter name and looking like **** | |
Hello, I have written the same code in c# and i seem to have any problems? I use 'procexp.exe' to check the performance. In the case of 'c++' the VM (Virtual Memory) and PM (Physical Memory) becomes larger every minute. There is also an I/O block with a lot of … | |
Hi all, I have a following code below, where I generate a matrix and lots of data, and finally I print out that data into one .dat file. Now I would like to share these data into many files, e.g. 4 .dat files in a continual way. To see what … | |
Hello Let me describe the problem: I've got 1 base class item which is inherited by a few other subclasses. Everything goes well until I put an object from a subclass into an array of items I lose the specific data of the subclass. I think I need something of … | |
I have created a procedure, exitFailure() that is invoked if a file doesn't exist: [CODE] int exitFailure() {//start exitFailure() printf("Failure, hit any key to exit and press enter.\n"); scanf("%d", &counterx); return 1; }//end exitFailure() [/CODE] Below is the snippit of code that invokes exitFailure() [CODE] inFile.open(inputFilename, ios::in); if (!inFile) { … | |
Hello I'm making a dungeons and dragons and i need something to contain all inventoryitems like pieces of equipment, potions,... How can I put them all in one array or vector? Thanks, Jasper | |
write a program whichask the user to enter the positive integer. then the program to display whether the user to enter the number is prime number or not. (prime number is the number which is divisible by one and the number itself) | |
How would I fill a two-dimensional array up with numbers. map_height = 9 map_width = 8 I have this code: [code] for (i=0; i<map_height; i++) { for (p=0; p<map_width; p++) { room_numbers[i][p] = w; w++; } } [/code] But when I try to print it out it comes up with … | |
I am not sure if the title of my thread indicates where the problem is, but that is what I think it is. [code] void convertFormat(vector<string>& files, map<string,int>& tickerMap, vector<int>& numRecords ) { string txt = ".txt"; string filePathNameString; for ( int k =0 ; k < (int)files.size(); k++) { … | |
:) Hello experts, Im taking a C++ class and i was asked to Write a program that uses a structure named MovieData to store the following information about a movie: Title Director Year Released Running Time (in minutes) I've come down to making it compile, but, when it couts the … | |
Im doing a school project. have to do dllimport as the SiUtil.dll is written in C++. But im not sure the coding below is correct as there is error. Please advise needed. [url]http://www.silabs.com/Support%20Documents/TechnicalDocs/an117.pdf[/url] Thanks a million. [CODE]using System; using System.Collections.Generic; using System.Windows.Forms; using System.Runtime.InteropServices; namespace ProgrammingInterface { static class Program … | |
Hi, I'm having problem with my linked list. The program I'm making should read in positive and negative numbers and put them into two separate lists. The numbers should be in rising order in the list. example: input: 3 5 1 -6 -2 -1 printing out the lists: pos: 1 … | |
i'm so sory because i made mistake when asking about this before.. so here i'll make correction in this post.... actually what i want to ask is why my cin.fail() code do not works?? i want this program to ask the user back the same question if the user enter … | |
hello all working on a class project in C++ using eclipse and g++ stuck a zip of the project as an attachment but here is the basics [CODE]#include <iostream> #include "Complex.h" #include "FileHandling.h" using namespace std; int main(int argc, char **argv) { FileHandling file();// opens the file and gets the … | |
Hello to all code gurus! First of, I wouldn't lie, i am not a professional programmer.....I am more of the opposite. I was given a program to write during a 4 day C++ programmers boot camp that I signed up for (which ended friday actually). By profession am a graphic … | |
Hello all, I need to create a function call to calculate the average...Can anyone help with that?? I'm not sure how to create a function in my code to calculate the average. My code currently terminates after I enter the 50 inputs and does not compute and read the average. … | |
i have writen the program but i cant seem to print result. the program builds a stack of numbers, then it adds,subs,mult, or divides all the numbers. for example 4 numbers are put in 1,2,3,4 it will ask what you wanna do . the answer should be 10 but instead … | |
I don't know if anybody here programs in C++ for the AS/400, specifically the Personal Communicator (PCOMM)... I have been able to successfully write programs in Visual Basic for Applications with Excel but I am having a hard time with C++. When I try to compile one of the sample … | |
Hey, I'm trying to do some compression on an ascii saved file, and running into problems. The original file starts off as such: [CODE]7+'Y 2+'J0-B)#0 [/CODE] I can read this in, and I get it as: [CODE]6 1 55 32 32 41 85 80 120 5 2 33 85 81 … | |
[code] #include "stdafx.h" #include <iostream> #include <iomanip> using namespace std; //------------------------prototypes---------------------------------- void ReadData(int &x, int &y, int &z); float FindMaxMin(int x, int y, int z, float &max, float &min); float ComputeAve(float x, float y, float z); void ShowAll(float x, float y, float z, float average, float max, float min); //-------------------------------------------------------------------- … | |
Please help, I can not answer on the project please help me Project Facility | |
I have a quick question. I use getline to read from a file and put the line in a string s I call cout<<s and the output is this: "HELLO, PLEASE \n "ENTER" A NUMBER \n" why are the \n ignored and treated as strings? thanks | |
i am having trouble with testing to see if aData is equal to exit i have tried a few diffrent things the only thing i have relized is that the compiler say that aData is a multi character constant any help is greatly appreciated [CODE]while (exit != 1) { char … | |
using functions write a program that captures details of a customer at a bank, account number, opening balance.The program should also include a function that allows a client to deposit money to account , withdraw money,calculate balance & query balance. | |
I am trying to write a program to find nearest prime to a number to its left...using for loop i just don't seem to get it right [CODE] #include<iostream.h> #include<conio.h> void main() { clrscr(); int n1,flag=0; cout<<"Enter The Number"<<endl; cin>>n1; for(int i=n1;i>0;i--) { for(int j=2;j<(i/2);j++) { if(i%j==0) { flag=0; } … |
The End.