49,761 Topics

Member Avatar for
Member Avatar for nurulshidanoni

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

Member Avatar for nurulshidanoni
0
3K
Member Avatar for gareth_2006

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]

Member Avatar for Ancient Dragon
0
39
Member Avatar for nimirraj99

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

Member Avatar for Ancient Dragon
0
96
Member Avatar for chemicaldave

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 …

Member Avatar for Ancient Dragon
0
318
Member Avatar for anbuninja

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

Member Avatar for anbuninja
0
113
Member Avatar for daviddoria

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 …

Member Avatar for Salem
0
170
Member Avatar for En1ro

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 …

Member Avatar for En1ro
0
177
Member Avatar for legendofme

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 …

Member Avatar for Narue
0
92
Member Avatar for Jennifer84

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

Member Avatar for Jennifer84
0
142
Member Avatar for zidaneqrro

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 …

Member Avatar for William Hemsworth
0
139
Member Avatar for Motvel

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 …

Member Avatar for dmanw100
0
121
Member Avatar for kiwihaha

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 …

Member Avatar for dmanw100
0
114
Member Avatar for Ngup

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

Member Avatar for Radical Edward
0
93
Member Avatar for trap-jaw

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.

Member Avatar for Radical Edward
0
44
Member Avatar for CodeBoy101
Member Avatar for zidaneqrro

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 …

Member Avatar for Sky Diploma
0
79
Member Avatar for zidaneqrro

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 …

Member Avatar for osirus0830
0
117
Member Avatar for bamabambhole01

Hii everyone !! Can anyone creat class delta.h for me ! Its about dirac delta function ( for 2d) . a simple one. Looking urgently. Regards,

Member Avatar for bamabambhole01
0
3K
Member Avatar for welles

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 …

Member Avatar for welles
0
95
Member Avatar for blah70

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.

Member Avatar for ithelp
0
93
Member Avatar for pakman31

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 …

Member Avatar for Ancient Dragon
0
6K
Member Avatar for savinki

We have a socket program written in standard c++. Could anyone tell me about what are the test cases i should do?

Member Avatar for Ancient Dragon
0
53
Member Avatar for drajairtt

hi, where i could get the wsock32.lib and ws2_32.lib files. please help me

Member Avatar for Ancient Dragon
0
51
Member Avatar for nemoUSA

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 …

Member Avatar for Ancient Dragon
0
99
Member Avatar for ArNy

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?

Member Avatar for lwxmeme
0
487
Member Avatar for loeto

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

Member Avatar for loeto
0
169
Member Avatar for nurulshidanoni

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

0
44
Member Avatar for risa

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

0
87
Member Avatar for alkeshtech

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

Member Avatar for Ancient Dragon
0
129
Member Avatar for jimJohnson

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

Member Avatar for Ancient Dragon
0
82

The End.