49,766 Topics
![]() | |
I need help with this problem. I have tried writting the program, i just can not get it to run properly. Problem is: Create a function named 'circle_area' that will find the area of a circle. This function should have the following prototype: float circle_area(float radius) circle_area should return PI*r^2. … | |
hi, I have this assignment can anyone solve it? THe programme statement is Problem Statement: Suppose we have a class named as Train it has two constructors, two methods, and a single attribute each of which described as follows:· One attribute:maxSpeed – an int value representing the maximum speed of … | |
Hello all Im back with another crazy assignment from my professor and I'm running into the following debugging errors in Vi (we have to use it) so here are the errors: Assign4.cpp: In member function âvoid cCourselist::Load(Infile_t&)â: Assign4.cpp:105: error: expected unqualified-id before â[â token Assign4.cpp:109: error: expected unqualified-id before â[â … | |
Hello. I am working on a game called Kingdom Management. It was working fine until I added in the buildings you can make. Then it started skipping over the building, lawmaking, do nothing, and quit sections. All it could do is research. Here is the code: [CODE] /******************************************************************************* Kingdom Management … | |
I downloaded the latest version in the repository and unless the tutorial im following is incorrect in the #include function then im lost. here is the code im trying to compile taken from the tutorial. [CODE] #include <QtGui> int main(int argc, char *argv[]) { QApplication app(argc, argv); QLabel label("Hello, world!"); … | |
I want get data from the car1.txt file and do the probability calculation but all result is 0.0% ?? just want to ask how to get large number of data from txt file by using array method. This is my txt file and cpp file [CODE]1 1 2 2 3 … | |
Hi, I have a task where I programatically will open 2 Explorer Windows in a minimized mode. I have searched and the code I have come up with looks correct to me but what happens is that these 2 browser windows do open in a Normal mode. That will be … | |
So I am getting a runtime error and I have narrowed down the problem to this method. I am still learning about iterators and I assume that the problem is with this part of the code, getting the expression error list iterator not decrementable. Any help would be appreciated. [CODE=cpp] … | |
Hi; I am new to MFC applications and working on a MCQ based game in Visual C++ using MFC. I have a small question to ask, if I click the option (a-d) that is correct, the game increases score and displays msg "correct' , but I am not able to … | |
My souce is below. function is called from main program. But during execution segmentation fault occur. If I execute half are ok, but half are failed. I used kdb. But still I don't know why. I think I used correct expression. kdb said "if(entry->d_type) == DT_REG) " is problem. I … | |
This is a coursework help *Just so its clear im playing by the rules* A question on my coursework is to "Put a structure within a structure and show how this can be addressed". I understand regular structures, and *hopefully* this code is correct. But im having trouble working out … | |
Hey, could someone help me out by telling me how I can read in 2 matrices from a single input file? | |
my pc don't show display when i exit my c language program.plz tel me how can i correct it | |
hi , I am using SYSTEM_INFO structure to know the processor architecture of machine. I did this [CODE] SYSTEM_INFO sys; memset(&sys,0,sizeof(sys)); GetSystemInfo(&sys); [/CODE] For Intel Pentium machine it is giving right information i.e. sys.dwActiveProcessorMask 3 sys.dwAllocationGranularity 65536 sys.dwNumberOfProcessors 2 sys.dwProcessorType 586 sys.wProcessorArchitecture 0 sys.wProcessorLevel 15 sys.wReserved 0 but running this … | |
Hi, I have the following problem: I have a program which uses NAG C library and when i compile it everything is fine, however when I want to start the program with debugging i have the following output: 'desktop.exe': Loaded 'C:\Users\Jorko\Desktop\test\projekt\desktop\Debug\desktop.exe', Symbols loaded. 'desktop.exe': Loaded 'C:\Windows\System32\ntdll.dll' 'desktop.exe': Loaded 'C:\Windows\System32\kernel32.dll' '[B]desktop.exe': … | |
Hi and I am writing a small program but need to make a function that converts an integer to a hex. Below is an example of a similar function but need the result stored in a std::string variable. [CODE]printf("%x%x%x%x%x",h0, h1, h2, h3, h4);[/CODE] Does anybody know how to create a … | |
i have to do a hotel managemet with c++.could you give me some hint about it? | |
Hi, We are hooking [COLOR="Green"]TextOut(),ExtTextOut() and DrawText() [/COLOR]methods GLOBALLY . i.e. [CODE]hhook = SetWindowsHookEx(WH_CBT, function_address, module_handle, 0);[/CODE] But we want to hook/unhook only a particular exe. Can someone tell us how to check all the existing threads and get the required exe and hook/unhook only that. Please provide help. Thank … | |
Hi in that code i need all lines those started with doble k in another as out put like double k325 = 2.000000e-01; . . .. double k297 = 8.000000e-03; pls help me i tried but i didnt get some one pls help how to solve this problem the code … | |
Here's the code. I'm trying to read data from a text file and put it into an array... I'm trying to do this using a function.... can anyone please help..... it's not running. There's an error somewhere.... [CODE] int main() { float readFloat(std::ifstream& readFile) { float holdData = 0; while(holdData … | |
Please help...I am having a problem with comparing double values in C++. I have stumble across this issue when my sorting algorithm tries to compare double values to check whether a < b / a > b. Based on the comparison result my sorting algorithm does sorting by ascending or … | |
I am pulling a list of 3 items with a list price from a text file, I ask for the percentage off and calculate it against the list price then I update to file with revised price. The program compiles correctly, but it never displays the info in the console … | |
Hey guys. I need to write a program that does the following: Requirements - The program... - Shall allow user to enter individual songs with information: - Shall ask for song name. - Shall ask for length. - Shall ask for artist name. - Shall ask for album name. - … | |
Hi How would I write a function that reads numbers from a txt file into an array. For example a function to call this code below: [CODE] float gradeData[12] = {0.0F}; int i; // loop counter ifstream myfile ("rainfall.txt"); if( myfile.is_open() ) { i = 0; while( i < 12 … | |
Pleasew help me.. I never learn about C++ before.Since i'm study abroad in japan,everyone had learnt evrything.So i feel like crazy because i didn't know anything..My lecturer give us assignment about calculator function programming..what should i do..how to make thats programming....:( Please anybody can help me | |
Hi, I'm trying to copy a value in a vector to a string. The vector is also of string type, I'm trying to copy through the iterator. [code=CPLUSPLUS] for(iter = inputStr.begin(); iter != inputStr.end(); iter++){ string temp = inputStr.at(iter); int count = 0; for(int i = 0; i != temp.size(); … | |
could someone please explain to me what wrong with my do while loop. i made a pokemon game in visual basic for school. i am teaching my self C++. i just started this weekend and wanted to see if i could covert my code over. everything works perfectly without the … | |
hey i just need some help understanding how to do this question, i need to find the running time, and show it in algebra like "2i+2" and also in Big O notation such as O(n^2), the question also asks to state the number of additions and subtractions in the algorithm … | |
Can someone help em out with this: Im suppose to do this: [URL="http://www.ise.ufl.edu/cgs2421/cpp/files/projects/pro2.pdf"]http://www.ise.ufl.edu/cgs2421/cpp/files/projects/pro2.pdf[/URL] I gotta use loops to solve the horner algorythm This is whta i have but is not working [CODE]#include <iostream> using namespace std; int main (void) {// VARIABLE DECLARATIONS: double choice; // EXECUTABLE CODE: cout << "CGS … |
The End.