49,761 Topics
| |
After read this file , i want to do a selection sort...below are the selection sort programming that i get from google [CODE=C++] #include <fstream> #include <string> #include <iomanip> #include <iostream> using namespace std; void sortData( string fId[], int noOfRows); int main () { string Id[100]; int total[100], i = … | |
hey im trying to compile a c++ operating system but dont really understand the compile instructions! the instructions are in readme.txt! can any one help me please? mabe make them a little more simple? cheers [URL="http://www.programmersheaven.com/d/click.aspx?ID=F39294"]download link[/URL] | |
okay i'm working on a very complicated problem (for me anyway) and i know i'm missing something somewhere. i need to be able to store data into an array but i don't want it looping right off. this is the structure for the data i need and my function headers. … | |
I have an assignment. I have to ask the user for a string to search for in a file. The program reads each line of the file and compares each string to the user's string. It then displays the line of the file the string was found on. Lastly, I … | |
well im writing a program where the user enters a number from 2 to 1000 and it displays the prime numbers. Its in a loop and i want it to stop when the users enters 'n' or 'N' well when i type n or N the program goes crazy haha. … | |
I ran this: [code] cout << "has nan q?" << numeric_limits<int>::has_quiet_NaN << endl; cout << "has nan s?" << numeric_limits<int>::has_signaling_NaN << endl; cout << "has nan q?" << numeric_limits<double>::has_quiet_NaN << endl; cout << "has nan s?" << numeric_limits<double>::has_signaling_NaN << endl; [/code] and I get 0 0 1 1 why would … | |
This code is in Unit1.h [CODE=C++] struct gydytojas { int gydid, amzius, specialyb, telefonas, asmkod; String vardas[25]; String pavarde[35]; String adresas[50]; friend ostream& operator<<(ostream& os, const gydytojas& obj) { return os; }; friend fstream& operator>>(fstream& os, const gydytojas& obj) { return os; }; }; gydytojas gydmas[100]; [/CODE] And this code … | |
I can't seem to figure out whats wrong. This isn't a finished program but it should compile anyways. [ICODE]#include <iostream> #include <string> using namespace std; const string SENTINEL = "\n"; int main () { char letter; int letterCt; cout << "Enter a line of characters" << endl; /* TO BE … | |
I have a textBox that I with help of a Button turning to a Gray BackColor like this. textBox1->BackColor = Color::Gray; Under this textBox I have a checkBox. *(with default "checked").* What I am trying to do here is that when I "uncheck" this checkBox, the textBox will turn "Red" … | |
Last question for today before you start hating me.. I don't know if this really belongs here, but I'll post here anyway. How do I make my programs stay on command prompt longer? Usually they just flash for a second if I don't open them up with command prompt. Heres … | |
Hi! Suppose i have a polygon with 5 points. They are constant. I use "gotoxy()" to define the point positions. Something like this: [ICODE] x1=30; y1=10; gotoxy(x1,y1); cout<<"A"; x2=50; y2=10; gotoxy(x2,y2); cout<<"B"; //.....and so one up five [/ICODE] Now i should to give a another point (X,Y), and calculate with … | |
i want to make a error check on each input. if i only got 1 input.. then i just use while(input==false) so it will continue ask user to input if he wrong input but if i have many input,then the while loop will complicated.. for example: Enter ur gender Enter … | |
Hi I'm using VC++.net 2.0 an creating a few technical indicators for grad school. I am having a problem creating the aroon indicator and I would appreciate some help. Here is a description of what the Aroon Indicator is : Aroon(up) = ((total_num_of_periods - num_of_periods_since_highest_close) / total_num_of_periods) x 100 Aroon(down) … | |
hi, i need a stl list to read a vector. I have a vector "vec" and i want to create a stl list, where i can insert new points to the vector list and remove. | |
How do I convert text in upper case to lower case? :?: | |
Alright, I'm probably going to become the biggest pain in the butt here during the days to come, but please bear with me. [code=Cplusplus] #include <iostream> int Subtract(int first, int second) { std::cout << "In Subtract(), recieved " << first << " and " << second << "\n"; return (first … | |
Hey, I'm using SAMS teach yourself C++ in 21 days, and currently I am on Day 2, however, I've gotten a lot of errors whenever I compile even though I type out the examples exactly as they should be. I'm using Borland C++ Compiler. command line tools or something like … | |
Hii everyone !! Can anyone creat class delta.h for me ! Its about dirac delta function ( for 2d) . a simple one. Looking urgently. Regards, | |
Hello, all, I am pretty new to C++ and I need to write a program for calculating radio propagation path loss based on ray tracing, C++ is used for its faster processing rather than MATLAB. I have a question about passing 2D arrays between functions. One of the files looks … | |
I have an assignment due tomorrow and I've done a bit on it but I dont know how to do the rest. Can anyone help me please. Thanks. | |
Hello, this is my first time posting here so im sorry for doing anything wrong. Also I am kinda new at programming so bare with me. I am currently working on a function that basically reads a list of double values and assigns them to an array. But I ran … | |
We have a socket program written in standard c++. Could anyone tell me about what are the test cases i should do? | |
hi, where i could get the wsock32.lib and ws2_32.lib files. please help me | |
Hello ALL my first post! hope get a quick reply. I am doing a for loop to display a array of strings . my problem is formating and organizing the display . i use cout << and setw() , but the problem is : the names is different lengths is … | |
In visual c++ 2003 to visual c++ 2005 are there any major changes,Are there any Syntax changes i know there has to be,and would the 2005 version be worth the money? | |
[code=cplusplus] #include <iostream> using namespace std; int main( ) { float rand, cent, pounds, shillings; cout << "Enter Pounds " << endl; cin >> pounds; cout << "Enter Shillings " << endl; cin >> shillings; pounds =1; shillings =1; // enter amount while both pounds and shillings is not equal … | |
why the output do not produce the output after sorting....anybody knows how to do a selection sort code? [code=C++] #include <iostream> #include <string> #include <cmath> #include <iomanip> #include <fstream> using namespace std; void selectionSort(int *y,int n)//selection sort function { int i, min,minat ; { for(i=0;i<3;i++) { minat=i; min=y[i]; if(min<y[i]) { … | |
MapFileAndCheckSum returns CHECKSUM_MAPVIEW_FAILURE(Could not map a view of the file) for file of size 758MB and above.For size upto 757MB it returns CHECKSUM_SUCCESS(normal behaviour).What is the meaning of this error?how to solve it?is there any file size limit to calculate checksum..............i want to calculate checksum upto 1.0GB/2.0GB | |
Hey Guys, I want to read from a file. And store the string in a string class array. Number of strings in the file is unknown. How could this be done? [code=C++] int n=0; while(!inFile2.eof()) { string tempStr = getWord(inFile2,n); if(tempStr.length() >=1) { wordCount++; } } inFile2.close(); inFile2.open(inFileName2.c_str()); string wordStr[wordCount]; … | |
I am going over some of my quizzes with questions I did not get right and was wondering if someone could help me w\ a few of them... What will the following code print to the screen: [code=c++] int num[15] = {3,2,8,7,1,5,6}; for (i=0; i <15; i+=3) { cout << … |
The End.