Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Some advice, even if it's not really an answer... You can't work like that, even for such a small project: you have to tackle one problem at a time.</p> <p>Basically, you tried to write your whole program, and <em>then</em> only to compile it: you need to write your different functions and test them separately, especially since you are a beginner.</p> <p>For instance, if you want to compile with gmplib, write something like this:</p> <pre><code>#include &lt;gmp.h&gt; int main () { mpz_t x; return 0; } </code></pre> <p>try to compile it and see what happens. If you have a compilation error, you will have a small piece of code that you can post here: add the exact message of your compiler, and the people here will help you instead of closing your question (again...).</p> <p>This would be the <em>first</em> problem: compiling with another library. Once this works, you can add a <em>small</em> piece of your own code, recompile it and test what you have so far.</p> <p>For instance, add your class declaration with a minimal definition for the functions: don't write the implementation, just a nearly empty body, e.g:</p> <pre><code>class OneClass { void pgcd (mpz_t, mpz_t, mpz_t) { /* empty function */ } // etc }; </code></pre> <p>you will be able (hopfully, it will be easy) to spot that you miss a semicolon at the end of your class declaration, and that your Transcoder function return a mpz_t, wich is illegal because mpz_t is a typedef for an array.</p> <p>Then, when this works, add the implementations of your function one by one, in an order that allow you to test them <em>as you write them</em>.</p> <p>You will be much more efficient, as it will be easier for you to know <em>where</em> you problem comes from.</p> <p>In short, finding an error in the two lines you just added (if you know the rest is correct) is easy, but finding all the errors in such a big file is long and painfull...</p> <p>Write one piece of code, compile it, test it and then only write the next one: it will pay !</p> <p>Edit: actually, you will need to <em>use</em> one function in the library to test if you can link with it properly, but it's the same idea.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload