49,766 Topics

Member Avatar for
Member Avatar for sutty8303

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. …

Member Avatar for peter_budo
0
305
Member Avatar for ishaiman

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 …

Member Avatar for sidra 100
-3
298
Member Avatar for atticusr5

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 â[â …

Member Avatar for atticusr5
0
112
Member Avatar for bman214

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 …

Member Avatar for bman214
0
141
Member Avatar for Anarionist

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!"); …

Member Avatar for Anarionist
0
98
Member Avatar for th3kingdom1

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 …

Member Avatar for th3kingdom1
0
168
Member Avatar for Lukezzz

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 …

Member Avatar for Lukezzz
1
201
Member Avatar for Yellowdog428

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] …

Member Avatar for Yellowdog428
0
162
Member Avatar for Learning78

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 …

Member Avatar for mitrmkar
0
158
Member Avatar for mikabark

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 …

Member Avatar for nezachem
0
166
Member Avatar for Suicidal_tool

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 …

Member Avatar for Suicidal_tool
0
106
Member Avatar for sidra 100
Member Avatar for Dimitar

Hey, could someone help me out by telling me how I can read in 2 matrices from a single input file?

Member Avatar for Dimitar
0
158
Member Avatar for vlove_3008

my pc don't show display when i exit my c language program.plz tel me how can i correct it

Member Avatar for Duoas
0
164
Member Avatar for ashishchoure

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 …

Member Avatar for ashishchoure
0
231
Member Avatar for studentffm

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': …

Member Avatar for Ancient Dragon
0
262
Member Avatar for cwarn23

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 …

Member Avatar for Poincarre
0
390
Member Avatar for wondie

i have to do a hotel managemet with c++.could you give me some hint about it?

Member Avatar for jonsca
-3
42
Member Avatar for team_ferrari22

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 …

0
75
Member Avatar for abhi.it01

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 …

Member Avatar for WaltP
0
217
Member Avatar for schoolboy2010

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 …

Member Avatar for WaltP
0
156
Member Avatar for agurrea

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 …

Member Avatar for agurrea
-1
194
Member Avatar for c1979h

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 …

Member Avatar for jonsca
0
195
Member Avatar for swolll

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. - …

Member Avatar for jonsca
0
2K
Member Avatar for schoolboy2010

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 …

Member Avatar for schoolboy2010
0
85
Member Avatar for kokoromidori

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

Member Avatar for Ancient Dragon
-2
97
Member Avatar for kenji

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(); …

Member Avatar for jonsca
0
135
Member Avatar for perroned

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 …

Member Avatar for perroned
0
107
Member Avatar for matrix360

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 …

-1
52
Member Avatar for sircuncid

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 …

Member Avatar for jonsca
3
167

The End.