Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

mayVB6

@mayVB6
About
Posts
4
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • urgent! plz help
    M mayVB6

    does the coding looks logical?

    C / C++ / MFC help question announcement

  • urgent! plz help
    M mayVB6

    hi...could anyone check the codings below? thanks. #include #include using namespace std; class Bus { int number; char startDepot[30]; char endDepot[30]; int departureTime; public: void update(); void display(); }; void Bus::update() { cout << "Enter the bus number (eg 83): "; cin >> number; cin.ignore(80, '\n'); cout << "Enter the start depot (eg Sengkang): "; cin.getline(startDepot, 30, '\n'); cout << "Enter the end depot (eg Punggol): "; cin.getline(endDepot, 30, '\n'); cout << "Enter the departure time (eg 1605): "; cin >> departureTime; cin.ignore(80, '\n'); } void Bus::display() { cout << "Bus number : " << setw(3) << setfill('0') << number << endl; cout << "Start depot : " << startDepot << endl; cout << "End depot : " << endDepot << endl; cout << "Departure time : " << setw(4) << setfill('0') << departureTime << endl;; } int main() { int count; Bus *b; cout << "How many buses are there: "; cin >> count; b = new Bus[count]; char choice; int num; do { cout << "u. Update\n"; cout << "d. Display\n"; cout << "e. Exit\n"; cout << "enter selection: "; cin >> choice; switch(choice) { case 'u' : cout << "enter bus number (1-" << count << "): "; cin >> num; b[num-1].update(); break; case 'd' : cout << "enter bus number (1-" << count << "): "; cin >> num; b[num-1].display(); break; } } while (choice != 'e'); delete [] b; return 0;

    C / C++ / MFC help question announcement

  • Binary Files Comparison
    M mayVB6

    Private Sub CompareBinaryFiles(t1 As String, t2 As String) Open txtOne.Text For Binary Access Read As #1 Open txtTwo.Text For Binary Access Read As #2 Dim pos As Long Dim differencepercentage As Single Dim o As Byte, t As Byte Dim textOne As String, textTwo As String Dim totalcount As Integer, differencecount As Integer 'need to initalize before computing totalcount = 0 differencecount = 0 On Error GoTo exit2 'loop the file until EOF Do Until EOF(2) 'count + 1 whenever the file loop totalcount = totalcount + 1 'calculating the positioning of the file pos = pos + 1 pos2 = pos2 + 1 If pos > txtOne Then GoTo exit2 Get #1, pos, t Get #2, pos, o 'add the countdiffernces by 1 If t <> o Then lstMistakes.AddItem "Byte " & pos & " - " & t & " (" & o & ")" If t <> o Then differencecount = differencecount + 1 'DoEvents If pos Mod 256 = 0 Then PB.Value = pos Loop GoTo esc exit2: If pos2 = cut Then GoTo esc lstMistakes.AddItem "---File ended at byte " & pos2 & " ---" esc: lstMistakes.Visible = True PB.Visible = False Close #1 Close #2 'calculating the percentage of the differnces of files On Error GoTo errhandler 'differencepercentage = (differencecount / totalcount) * 100 List2.AddItem "Binary Compare Similarity :" & 100 - differencepercentage & " %" List2.AddItem "Binary Compare diffences :" & differencepercentage & " %" Exit Sub errhandler: Resume Next End Sub Is this the way to do the binary files comparison? But when i include this function my normal text files comparison will have a extra line at the end of each documents!

    Visual Basic question help

  • Binary Files Comparison
    M mayVB6

    I m doing on a project which requires me to do a binary file comparison. Can anyone help? How do i go abt coding it?

    Visual Basic question help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups