49,761 Topics
| |
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 … | |
Hello! I have a question regarding the set up of my binary search. For my program I am working on, I have taken a .txt file full of first names and sent those first names to a string array. The names are then sorted, and from there I ask the … | |
Ok... so i am making a rather simple calculator, that solves for either derivatives or a polynomial. Though I have to make my own linkedlist is the challenge. Ok, I will just copy and paste the LinkedList.cpp file: [code]#include <stdlib.h> #include <cstdlib> #include <string> #include <cstdlib> #include <iostream> #include <algorithm> … | |
Hi... I'm trying to write a program that reads data(numbers) from a text file into an array, finds the average and sorts it in ascending order then outputs the result into a txt file. Here's what I've done so far... it's not running, pls help [CODE] #include <iostream> #include <fstream> … | |
I have made a minor program. My program doesn't modify and I want to add a person at begining with emergency function. please help me out where i m lacking.[code] #include<iostream.h> #include<conio.h> #include<fstream.h> #include<ctype.h> #include<string.h> #include<stdio.h> class hospital { char name[20]; int age; int i; public: hospital() { i = … | |
I have been given the task of finding the complexity of the function used to find the kth smallest integer in an unordered array of integers. Below I have displayed the function I am analysizing. I have shown the steps as I understand them. Any help in understanding this would … |
The End.