Thread: Returning Correspond Matrix to problem rules

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #8
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    but my problem is what the algorithm to use for grabbing each 8followed bit after each occurrence of SearchedWord and storing them in the matrix(at the end I return the matrix) .. here's my catch!
    If you already found the word, grabbing the 8 bits is just a matter of computing where they start and copying them.

    Any suggestion? for instance in C++ there's an already built function called find but in c there's no function called find that I can call it!
    Write it. If you find it too hard, work on a simplified version of this problem, i.e., all you're interested in is finding the very first instance of the word. No 8 bits, no matrix. Refer to posts #2, #4 and #6 to help you because those contain the very suggestions that you're asking for.
    Last edited by laserlight; 01-01-2021 at 11:57 AM.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 05-19-2014, 07:32 PM
  2. Returning a double matrix
    By adarpodracir in forum C Programming
    Replies: 5
    Last Post: 03-25-2012, 03:20 PM
  3. Problem Returning Value
    By CProgramming11 in forum C Programming
    Replies: 12
    Last Post: 11-21-2010, 11:27 AM
  4. Matrix Problem
    By TheJones in forum C Programming
    Replies: 2
    Last Post: 11-01-2006, 11:34 AM
  5. Returning a Matrix
    By Shamino in forum C++ Programming
    Replies: 14
    Last Post: 02-25-2006, 01:36 AM

Tags for this Thread