Showing results 1 to 40 of 219
Search took 0.01 seconds.
Posts Made By: nurulshidanoni
Forum: C++ May 28th, 2008
Replies: 2
Views: 256
Posted By nurulshidanoni
Re: Sort many array

Thank you vernon dozier for your great suggestion....
Forum: C++ May 27th, 2008
Replies: 2
Views: 256
Posted By nurulshidanoni
Sort many array

Dear all,

I have this code and this data...but i want to sort the sum1 in descending order..but my problem is..i want to sort many array....like this..

after sort
3: ............. 46
1:...
Forum: C++ May 15th, 2008
Replies: 1
Views: 166
Posted By nurulshidanoni
sort y but it not sort x

I have x and y array...After I have sort y, it succefully sort the y. but for x, there is some number that are not sort like this

x y30 1
45 1
46 1
15 1

I want the x sorting also...like this

x ...
Forum: C++ May 12th, 2008
Replies: 9
Views: 582
Posted By nurulshidanoni
Re: Read File>>>>

Ok. I have suucessful read the text file...but still have some error to do a selection sort and print elements,...can somebody help me? inline 55 and 56



F:\300408\913.cpp(55) : error C2664:...
Forum: C++ May 12th, 2008
Replies: 9
Views: 582
Posted By nurulshidanoni
Re: Read File>>>>

So, What i suppose to do now?delete arr?
Forum: C++ May 12th, 2008
Replies: 9
Views: 582
Posted By nurulshidanoni
Re: Read File>>>>

I have done likethis , but cannot run the program, because there is some error.How to subscript require array or pointer? in line 43.

3.cpp
F:\300408\913.cpp(43) : error C2109: subscript requires...
Forum: C++ May 12th, 2008
Replies: 9
Views: 582
Posted By nurulshidanoni
Read File>>>>

this is the sample program of selection sort, which is given the value. But, how to call the value from read file? anybody knows?



#include <iostream>
using namespace std;

void selectionSort(int...
Forum: C++ May 6th, 2008
Replies: 10
Views: 369
Posted By nurulshidanoni
Re: Void

i have change like this, but the output only display for i=0 only.

and it said in is using without initialized.
in is for what actually? cin?

output
1 20
1 20
Press any key to continue
Forum: C++ May 6th, 2008
Replies: 10
Views: 369
Posted By nurulshidanoni
Re: Void

fill it from the data that is read mean if I have 3 data so must write..and if i have 100 data, so i must write also..is it like that?
Forum: C++ May 6th, 2008
Replies: 10
Views: 369
Posted By nurulshidanoni
Re: Void

but, i want to call the data from the text file...because, i have 100-300 data, So it it another way, to do?
Forum: C++ May 6th, 2008
Replies: 10
Views: 369
Posted By nurulshidanoni
Re: Void

Dear Ancient Dragon,

so, I must declare like this?



void main ()
{
int y[]={20,30,25};
int x ;
Forum: C++ May 6th, 2008
Replies: 10
Views: 369
Posted By nurulshidanoni
Re: Void

how to called the selection sort?what must i add?
Forum: C++ May 5th, 2008
Replies: 10
Views: 369
Posted By nurulshidanoni
Void

Why the selection sort output not appear? Anybody knows how to correct it?




#include < iostream >
#include < string >
#include < cmath >
#include < iomanip >
#include < fstream >
Forum: C++ May 5th, 2008
Replies: 12
Views: 760
Posted By nurulshidanoni
Re: Selection sort from read file

so I must write like this?add the selectionsort in line 48?


#include <iostream>
#include <string>
#include <cmath>
#include <iomanip>
#include <fstream>
using namespace std;
Forum: C++ May 5th, 2008
Replies: 0
Views: 165
Posted By nurulshidanoni
Produce output

why the output do not produce the output after sorting....anybody knows how to do a selection sort code?




#include <iostream>
#include <string>
#include <cmath>
#include <iomanip>
#include...
Forum: C++ May 5th, 2008
Replies: 12
Views: 760
Posted By nurulshidanoni
Re: Selection sort from read file

why the output only produce
1 20
2 35
3 15

but not produce for the selection sort output?


#include <iostream>
#include <fstream>
Forum: C++ May 5th, 2008
Replies: 12
Views: 760
Posted By nurulshidanoni
Re: Selection sort from read file

i change the a[i] to x and total[i] to y[i] ..so it easy to read..

the x and y are the data from a read file

jes.txt
1 20
2 30
3 25
Forum: C++ May 5th, 2008
Replies: 12
Views: 760
Posted By nurulshidanoni
Re: Selection sort from read file

i have done a correction, but the programming said..x and y are used without initialized..inline 50

How to initialized x and y?

F:\300408\905.cpp(51) : warning C4700: local variable 'y' used...
Forum: C++ May 4th, 2008
Replies: 12
Views: 760
Posted By nurulshidanoni
Re: Selection sort from read file

how to make correction of this error in line 41 and 63


.5.08.cpp
f:\300408\3.5.08.cpp(41) : error C2601: 'selectionSort' : local function definitions are illegal
f:\300408\3.5.08.cpp(63) : error...
Forum: C++ Apr 30th, 2008
Replies: 12
Views: 760
Posted By nurulshidanoni
Selection sort from read file

After read this file , i want to do a selection sort...below are the selection sort programming that i get from google


#include <fstream>
#include <string>
#include <iomanip>
#include...
Forum: C++ Apr 30th, 2008
Replies: 9
Views: 277
Posted By nurulshidanoni
Re: error erro iq error

-858993460
is the output file,,,,thank you Master Vernon
Forum: C++ Apr 30th, 2008
Replies: 9
Views: 277
Posted By nurulshidanoni
Re: error erro iq error

for (i = 0; i < 3; i++)

yehaaaaaaaaaaa...i get that it..after i change from 4 to 3 then the -858993460
dont appear......
Forum: C++ Apr 30th, 2008
Replies: 9
Views: 277
Posted By nurulshidanoni
Re: error erro iq error

This is a data that I wnt try to read..but why when i compile it appear -858993460
after 50?why..i dont know what is -858993460

1 20
2 15
3 50



#include <fstream>
Forum: C++ Apr 30th, 2008
Replies: 9
Views: 277
Posted By nurulshidanoni
Re: error erro iq error

I try to read this file firt , but it have -858993460 in the last?

1 20
2 15
3 50
-858993460
Press any key to continue

#include <fstream>
#include <string>
Forum: C++ Apr 29th, 2008
Replies: 9
Views: 277
Posted By nurulshidanoni
Re: error erro iq error

but I want to do a selection sort because it more quickly than bubble sort
Forum: C++ Apr 29th, 2008
Replies: 9
Views: 277
Posted By nurulshidanoni
error erro iq error

I have this data, but when i sort it different from what i want.

I want to sort in descending order like this

2 30
1 20
3 15

jest.txt
1 20
Forum: C++ Apr 28th, 2008
Replies: 2
Views: 304
Posted By nurulshidanoni
Selection sort:::

How to do a selection sort?
Which I want to sort in descending order this data

1 50
2 90
3 40
Forum: C++ Apr 28th, 2008
Replies: 14
Views: 469
Posted By nurulshidanoni
Re: Read array

so..I must continue this programming or continue the old one?
Forum: C++ Apr 28th, 2008
Replies: 14
Views: 469
Posted By nurulshidanoni
Re: Read array

So I must chane [i][0] to [140][2]?



int array[140][2] = {0};
ifstream myfile("STA83SOLUTION.txt");
int i;
while( myfile >> array[i][0] >> array[i][1] )
i++;
Forum: C++ Apr 28th, 2008
Replies: 14
Views: 469
Posted By nurulshidanoni
Re: Read array

F:\508.cpp(35) : warning C4508: 'main' : function should return a value; 'void' return type assumed
Forum: C++ Apr 28th, 2008
Replies: 14
Views: 469
Posted By nurulshidanoni
Re: Read array

Why no output is appear?


#include <iostream> // std::cout
#include <fstream>
#include <iomanip>
#include <string> // std::string
#include <vector> // std::vector<>
#include <algorithm>...
Forum: C++ Apr 28th, 2008
Replies: 14
Views: 469
Posted By nurulshidanoni
Re: Read array

Just change it like this to make 2d array?


int array[140][2]={0};
int temp;
if (myfile.is_open())
{
for (int i = 0; i < exams.size(); i++)
{
for (int j = 0; j<exams.at(i).total.size(); j++)
Forum: C++ Apr 27th, 2008
Replies: 14
Views: 469
Posted By nurulshidanoni
Re: Read array

I'm having problem when i want to cout the data that i sort.


int temp,bubsort,arr,display;
if (myfile.is_open())
{
for (int i = 0; i < exams.size(); i++)
{
for (int j = 0;...
Forum: C++ Apr 27th, 2008
Replies: 14
Views: 469
Posted By nurulshidanoni
Re: Read array

yes...but it was so complicated..i want to read as simple as possible.
Forum: C++ Apr 27th, 2008
Replies: 14
Views: 469
Posted By nurulshidanoni
Read array

How to declare the array and read the array? Must I use data structure?

Two array

1 30
2 20
3 10
4 50
5 15
Forum: C++ Apr 23rd, 2008
Replies: 8
Views: 551
Posted By nurulshidanoni
Re: vector to float

I have done like this.. but still many error..
i have change ti float..then for array.total i change to size.total=0.

rror C2228: left of '.push_back' must have class/struct/union...
Forum: C++ Apr 22nd, 2008
Replies: 8
Views: 551
Posted By nurulshidanoni
Re: vector to float

"

Ancient,..
where is teh curernt value of total?
Forum: C++ Apr 22nd, 2008
Replies: 8
Views: 551
Posted By nurulshidanoni
Re: vector to float

yes...I want to do like that but

" instead of push_back(123) just add 123 to the current value of total. "

123 ?I dont understand...Ancient Dragon.
Forum: C++ Apr 21st, 2008
Replies: 8
Views: 551
Posted By nurulshidanoni
vector to float

How to change this data sturucture from vector <int> total; to float total;? because if I change it to float teher is many error....


#include <iostream> // std::cout
#include <fstream>
#include...
Forum: C++ Apr 18th, 2008
Replies: 11
Views: 537
Posted By nurulshidanoni
Re: descending

thank you so much chandra rajat and localp...I will try try to do your suggestions.
Showing results 1 to 40 of 219

 
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 10:24 am.
Newsletter Archive - Sitemap - Privacy Statement - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC