49,761 Topics

Member Avatar for
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
166
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
200
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
161
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
157
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
162
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
104
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
157
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
161
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
227
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
260
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
277
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
204
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
153
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
193
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
194
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
84
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
133
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
106
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
163
Member Avatar for ppotter3

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 …

Member Avatar for mitrmkar
0
700
Member Avatar for jigglywiggly

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

Member Avatar for jigglywiggly
0
221
Member Avatar for schoolboy2010

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

Member Avatar for schoolboy2010
0
104
Member Avatar for Deepika13

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

-1
50
Member Avatar for rwill357

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 …

Member Avatar for Anarionist
0
407

The End.