Search:

Type: Posts; User: giove

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    1,887

    You are working in C. b is a char *. In the...

    You are working in C.
    b is a char *.
    In the function you assign to this "a variable!" this means that the address of this string (that is somewhere in the memory) is used in testVars.
    When the...
  2. Replies
    2
    Views
    4,253

    First: Grade is an integer and not an integer...

    First:
    Grade is an integer and not an integer array.
  3. Replies
    6
    Views
    1,020

    #include #include ...

    #include <stdio.h>
    #include <stdlib.h>

    typedef struct Person{
    int age;
    struct Person *next;
    }ListPerson;

    int main(){
    int n;
  4. Replies
    6
    Views
    19,985

    If you want a char pointer to your array, you can...

    If you want a char pointer to your array, you can simply do


    int intArray[3];

    char *charArray;

    charArray=(char *)intArray;
  5. Replies
    6
    Views
    1,020

    This struct has a pointer to another struct....

    This struct has a pointer to another struct.
    Yes, with this you can have a list. Is up to you to fill it correctly.
  6. Replies
    2
    Views
    7,281

    printf("okay you are done for now, continue?");...

    printf("okay you are done for now, continue?");
    scanf("%c", &contin);
    printf("will anything else work?");
    scanf("%d", &f);

    //inputData(arrayPtr,&n, n);

    return 0;
    }
  7. Replies
    2
    Views
    767

    #include using namespace std; int...

    #include <iostream>
    using namespace std;

    int main(int, char**) {
    int milesPerDay;
    int daysPerWeek;
    int weeksPerYear;
    int milesPerGallon;
    double pricePerGallon;
    char...
  8. Replies
    2
    Views
    945

    This is wrong. int []function(int val, int...

    This is wrong.


    int []function(int val, int val2){

    int i=0;
    int o=0;
    for (i=val;i<val2;i++){
    a[o]=i;
    o+=1;
  9. Replies
    5
    Views
    1,488

    Probably while (swapped){ ...

    Probably


    while (swapped){
    swapped=0;
    // for (i=0;(i<4)&&(swapped=0); i++){ wrong
    for (i=0;(i<4)&&(swapped==0); i++){
    if (array[i]>array[i+1]){
    ...
  10. Replies
    5
    Views
    3,594

    May be you must redirect it? Something like: ...

    May be you must redirect it?
    Something like:


    popen("myexe 2>&1","r"))

    So you can get output.
    It's a guess....
  11. Replies
    5
    Views
    3,594

    while ( fgets(buffer, sizeof buffer, pipe)); ...

    while ( fgets(buffer, sizeof buffer, pipe));
    {
    printf("row %d: %s\n", row, buffer);
    row++;
    }



    May be you want to write:
  12. Replies
    2
    Views
    899

    case 1: case 2: it's better.

    case 1:
    case 2:
    it's better.
  13. Replies
    7
    Views
    7,934

    you must implement a recursive sorting. Starting...

    you must implement a recursive sorting.
    Starting from the first node, if the i node value is bigger than the i+1 one, you change the next assignement, and so on.
  14. Replies
    4
    Views
    1,528

    Less quick: Board(int xMax=10, int yMax=10,...

    Less quick:


    Board(int xMax=10, int yMax=10, int amountOfMines=10){
    gameOver = false;
    this->xMax = xMax;
    this->yMax = yMax;
    this->amountOfMines = amountOfMines;
    tbl = new...
  15. Replies
    4
    Views
    1,528

    After a quick look: in Board() function you...

    After a quick look:
    in Board() function you instance the memory for an array of Square, but the Square itself is not instanced.
    In init() the tbl in not initialized.
  16. Replies
    17
    Views
    2,097

    if (scanf ("%d%d%d", &nums[0], &nums[1],...

    if (scanf ("%d%d%d", &nums[0], &nums[1], &nums[3]) == 3)

    Is not scanf for scanning from input?
    if you want to scan a char string you must use sscanf.
    Or better, you can use directly a fscanf...
  17. Replies
    19
    Views
    2,762

    Why gcc is not a good compiler?

    Why gcc is not a good compiler?
  18. Thread: help in object

    by giove
    Replies
    2
    Views
    895

    At first a lot of sintax errors!! ...

    At first a lot of sintax errors!!



    #include<stdio.h>
    #include<iostream>
    #include<conio.h>

    class dog
    {
  19. Replies
    2
    Views
    3,085

    I don't understand exactly what 's your question....

    I don't understand exactly what 's your question.
    Do you want to r/w a file in the same path where you executable is?
    If yes, you can use
    LPTSTR GetCommandLine(void);
    this function returns an...
  20. Replies
    5
    Views
    4,593

    Do you mean A=B; and B=A; without using C?

    Do you mean
    A=B; and B=A; without using C?
  21. Replies
    6
    Views
    4,955

    is sja1000.h included in or before pcancommon.h?

    is sja1000.h included in or before pcancommon.h?
  22. I don't know what is the job of...

    I don't know what is the job of
    rr_counts(xx_r,yy_r,zz_r,nrows2,nrows3,rad);
    What you can do, I suppose is:



    void third_read_file(long double *rad, int *nrows3)
    {
    some code
    .
  23. You must define the function rr_counts(struct...

    You must define the function
    rr_counts(struct DataList* arrayOne,struct DataList* arrayTwo);
  24. The rule inside a single file is this: a...

    The rule inside a single file is this:

    a variable is called global if it's defined outside main() or functions().

    If you want to declare them inside the main(), you must then pass all them as...
  25. Replies
    6
    Views
    4,955

    But the struct's must be defined somewhere in...

    But the struct's must be defined somewhere in sja1000.h before the exetrn declaration.
    The compiler must know in advance what CAN_..... are!
    If you define only in .C file, the compiler fails.
    Try...
Results 1 to 25 of 34
Page 1 of 2 1 2