49,757 Topics
| |
cout <<"a="; cin >> a; cout >> "b="; cin >> b; cout << c=a+b; goto a; error:undefined label 'a'. how to solve it? | |
Hey everyone, In addition to... Lazy Foo's Tutorial http://lazyfoo.net/tutorials/SDL/index.php "SDL Game Development" - Shaun Mitchell book are there any other recommended resources (does not have to be SDL) people could suggest? I've already created a console-based text adventure game and am really interested in expanding it into a text-adventure game … | |
i have these code for get image pixel data: typedef std::vector<BYTE> pixeldata; pixeldata GetImagePixel(HDC hdcImage) { BITMAP bmp = {0}; BITMAPINFO Info = {0}; memset( &bmp, 0, sizeof(BITMAP) ); HBITMAP hBitmap =(HBITMAP) GetCurrentObject(hdcImage, OBJ_BITMAP); GetObject(hBitmap, sizeof(BITMAP), &bmp); BITMAPINFO info { }; info.bmiHeader.biSize = sizeof(info.bmiHeader); info.bmiHeader.biWidth = bmp.bmWidth; // pay attention … | |
i'm getting problems, again, on how i get the frame delay on gif files using Image class: UINT TotalBuffer = img2.GetPropertyItemSize(PropertyTagFrameDelay); //img2 = (PropertyItem*)malloc(TotalBuffer);//my compiler gives an error img2.GetPropertyItem(PropertyTagFrameDelay,TotalBuffer,&img2); framedelay=TotalBuffer; seems that the GDIPLUS can be a litte diferent from compiler to compiler :( so how can i get the … | |
write a c++ program that can use a linked list to store10 studets records with following fieds,reg no marks and grade.program shoould be able to enter records one after the other and display results | |
Hey guys working on an assignment called monkey business and here is my code im getting an error on these two things. Error: [CODE] cout << "Monkey number " << [COLOR="Green"](monkey + 1)[/COLOR] << " ate the least amount of food,\n" << leastFood << " pounds, on day " << … | |
where and how do I add array statement and ofstream? #include <iostream> using namespace std; int main(int argc, char** argv) { int size, crust, flavor, extra, order=0, total=0; cout<<"Good day! Welcome to Don Rogelio's Pizza. \n"; do{ cout<<"\nPizza size: (1)Small (2)Medium (3)Large :"; cin>>size; cout<<"\nPizza Crust: (1)Thin Crust (2)Regular Crust … | |
Hello, Is there any limitation for the length of array variables in C++? Can I specify the length as wanted or is there any limitation for the array length? What should be the array length, if the length is not known. wchar_t commandString[10000]; Cheers | |
Hi, I needed some assistance on this program I am working on. First its about putting airplanes into gates, if no gates are open the print airport full. Right now mine simulates all the arrivals and departures. I show it put it will change when I implement the Stack. The … | |
I'm trying to to find elements into an array and look for the same elements into another array and i'm trying to assign the same ones with a 'y' for yes and 'n' for no, here is the code i did, but the code only reads it index by index, … | |
In below program both **if statements gives an error** #include<iostream> #include<conio.h> using namespace std; class operation { int bank_id,balance; public: int input() { cout<<"enter the bank_id "; cin>>bank_id; cout<<"enter the balance "; cin>>balance; } operation operator ==(operation p) { operation b1,b2; b1.bank_id=bank_id+p.bank_id; b1.balance=balance+p.balance; b2.bank_id=bank_id+p.bank_id; b2.balance=balance+p.balance; if(b1==b2) { return b1; } … | |
Write program that reads an integer array until -1 is entered. It asks the user to enter starting and ending subscript of the array (index number). The main will call a recursive function that takes an integer array, a starting subscript and an ending subscript as arguments, and returns the … | |
Hello, I have 2 **wstring** variables: std:wstring first =L"Jose"; std:wstring second = L"James"; How can I combine these variables: first + second gives an error in Visual Studio. Cheers | |
log in password: Welcome! (1) Add (2) View (3) Search (4) Exit Choice: Add Employee Record Input no. of Employee: the system is now ready to accept_ employee records press any key to continue...... Add Employee Record Employee Name: Year of Service: Numeric Rate: Adding_Employee Record Successfully Done! Back to … | |
#include<iostream.h> #include<stdlib.h> #include<conio.h> void main() { clrscr(); //char serial[]="EXAMS"; //int number[]={69,66,67,68}; randomize(); char planets[][10]={"Mercury","Venus","earth","Mars"}; //cout<<number[random(1)]; for(int i=0;i<4;i++) cout<<"::"<<planets[sizeof(char)+random(3)-1]; getch(); } How to calculate the output for it. Options: 1::venus::mercury::mars::earth 2::earth::mercury::venus::earth:: 3::mercury::earth::mercury::earth 4::mars::mercury::venus::earth | |
Please help me figure out what is wrong with my code... [code] #include <iostream> // required to perform C++ stream I/O #include <iomanip> // required for parameterized stream manipulators using namespace std; // for accessing C++ Standard Library members //declaration of calculateAverage function-template prototype template <class T> T calculateAverage(T dataValue[], … | |
I'm trying to build my skills here. This code compiles and runs successfully if I go out of class. It crashes when I need to enter numbers for matrices. Can somebody explain to me why this crashes? #pragma once #ifndef matrixType_h #define matrixType_h template <class T> class matrixType { public: … | |
I'm developing a game that has a word falling to the bottom of the screen and the user typing that word before it hits the bottom. So you'll be able to type input while the word is falling. Right now I have a timer that waits 5 seconds, prints the … | |
Can anyone tell me about these lines that why we use them in our program during filehandling process..Thanks in advance.. :) int pos=(-1)*static_cast<int>(sizeof(account)) | |
I can't Delete a specific record from my program.I need Your Help Guys.Thank's in Advance.. #include<iostream> #include<fstream> using namespace std; class teacher{ long long cnicno; char name[30],fathername[30],address[50],grade[10]; public: void input() { system("cls"); cout<<"Enter CNIC.No without '-' : "; cin>>cnicno; cout<<"Enter Name : "; cin.ignore(); cin.getline(name,30); cout<<"Enter Father Name : "; … | |
Hello, I know that you don't provide solutions to homework but I know Daniweb will help with homework as long as we show we are doing some work ourselfs. My assignment is to generate the maximum spanning tree for a given matrix. I am CLOSE but not quite there. I … | |
Okay... So I am an avid programmer. I have been writing applications in C, C++ and C# for almost 10 years now. I'm also a second year computer science student. Like many people I love computer games, more specifically adventure/ rpg games like runescape, elder scrolls etc. I have programmed … | |
Community Hospital needs a program to compute and print a statement for each patient. Charges for each day are as follows: a) Room charges: private room, $125.00; semiprivate room, $95.00; ward,$75.00 b)Telephone charge: $1.75 c)Television charge: $3.50 | |
I need help finding a bug in my program. Whenever I run it it keeps saying Debug Assertion Failed. Expression:_block_type_is_valid(phead- nblockuse). Here's the code: http://pastebin.com/0vVciqZS | |
Hi, I have always programed in Turbo C 3.0 and little exp. with 4.5 but recently I installed Borland C++ Builder 6 and the environment is completely diifferent.. I was just testing some codes to get used to this new environment.. But this code below is giving an error i've … | |
so all i want to so is read a txt file and store it into an array but im im having a difficulty and here is my code and my txt file has a delimeter (',') so i put a getline function as well but it is not wrking for … | |
/*Hi guys ^^ can you help me ?? i keep getting these "error C2447: missing function header (old-style formal list?)" i just want to do 2 converters and somehow i end up in doingthis, pls guys help me ^^*/ # include <iostream> # include <cstdlib> using namespace std; int choice; … | |
i am trying to save file data to int array their are three files and every file contain more than 1 million records and i don't know how to save this data to array.............. file look like 12000 135680 69857 5986 . . . . . anyone please help me … | |
Hello everybody, I need your help to solve my problem. I've just upgraded my Windows from 7 Ultimate to 8, and my Dev-C++ (latest version - 5.7.1) it's compiler is becoming slower than when I use it in Windows 7 environment. It takes more than 20 seconds to compile a … |
The End.