Search:

Type: Posts; User: Kyro

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Thread: code problem

    by Kyro
    Replies
    8
    Views
    1,676

    in list.h the line struct Node; ...

    in list.h

    the line


    struct Node;


    replace it with the structure body.
  2. Thread: code problem

    by Kyro
    Replies
    8
    Views
    1,676

    yup, this code /* Place in the interface...

    yup, this code



    /* Place in the interface file */
    struct Node
    {
    ElementType Element;
    Position Next;
    Position Last;
  3. Thread: code problem

    by Kyro
    Replies
    8
    Views
    1,676

    can you post the headers "fatal.h" and "list.h"....

    can you post the headers "fatal.h" and "list.h". I have a feeling that you have just declared the structures but haven't actually defined them.

    ie. You told the compiler a structure name but...
  4. Replies
    7
    Views
    2,193

    what XSquared said. But as for y it's...

    what XSquared said.

    But as for y it's crashing, i'd say because u need to pass cat.age's address.

    scanf takes the address of an object, so



    scanf("%i",&(cat.age));
  5. Replies
    8
    Views
    1,454

    take a look at the code below compare it to...

    take a look at the code below

    compare it to the code you've written.



    int main()
    {
    int a[5][5] =
    {
  6. Replies
    6
    Views
    1,302

    #include #include int...

    #include <iostream>
    #include <string>

    int main()
    {
    std::string name;
    std::string lastname;

    cout << "Enter first name" << endl;
    cin >> name;
  7. Replies
    15
    Views
    3,544

    OK takin from stroustrup himself "Except by...

    OK takin from stroustrup himself

    "Except by using an initializer list, there is no way to specify explicit arguments for a constructor in an array declaration."

    he also goes on to write code...
  8. Replies
    15
    Views
    3,544

    oh sorry didn't read that one. Must be a VC++...

    oh sorry didn't read that one. Must be a VC++ thing, i cause i didnt' have to write a copy constructor, just a constructor :S
  9. Replies
    15
    Views
    3,544

    wouldn't use copy constructor, it would use the...

    wouldn't use copy constructor, it would use the constructor. Each element would just be constructed a single variable.
  10. Replies
    8
    Views
    1,454

    for(row = 0; row < 5; row++) { low =...

    for(row = 0; row < 5; row++)
    {
    low = a[row][col]; // don't think this should be here

    if ( a[row][col] < a[row][col])
    low = a[row][col];
    }


    well first u should initialise...
  11. Thread: Example

    by Kyro
    Replies
    7
    Views
    1,364

    well first u can't use keywords for variable...

    well first u can't use keywords for variable identifiers, so u wouldn't beable to use int as a float variable.

    int is the keyword for declaring an integer variable.

    it seems that u've missed...
  12. Replies
    8
    Views
    1,454

    to make it easier to start of with, i suggest...

    to make it easier to start of with, i suggest breaking up the program into several loops, not just 1 loop and a nested loop.

    first loop would do the input for the array, no summing up.

    another...
  13. Replies
    3
    Views
    1,660

    can u post ur original class definition? if...

    can u post ur original class definition?

    if the static data member is private u can only access it once outside the class, thats for initialising the memeber.
  14. Replies
    3
    Views
    1,660

    yes, static members are created when the program...

    yes, static members are created when the program is first run like globals. Can u just post some of your code?
  15. Replies
    3
    Views
    1,934

    although my knowledge in this area is limited i...

    although my knowledge in this area is limited i do know some stuff.

    A process is a program running. But a thread is a part of a programm running.

    A thread is like a cut down version of a...
  16. Replies
    3
    Views
    1,299

    was tryin to find a previous post that explained...

    was tryin to find a previous post that explained ur question but i can't seem to find it.

    anyway, the header files only contain (function wise anyway) only function prototypes. Thats all the...
  17. Thread: For Loops

    by Kyro
    Replies
    10
    Views
    1,759

    loop are explained here ...

    loop are explained here

    http://www.cprogramming.com/tutorial/lesson3.html
  18. Thread: read files

    by Kyro
    Replies
    4
    Views
    866

    can u say what is wrong with it, other than not...

    can u say what is wrong with it, other than not accessing the std namespace for fstream, cout and endl it runs fine.
  19. Thread: For Loops

    by Kyro
    Replies
    10
    Views
    1,759

    well for(i = 0; i < 10; ++i) { } is...

    well


    for(i = 0; i < 10; ++i)
    {
    }

    is the same as
  20. Replies
    10
    Views
    4,360

    with a few changes ur original code works ...

    with a few changes ur original code works



    char cs[4];
    long lv1=12345;
    long *lv2;

    memcpy(cs, &lv1, 4);
    lv2=(long*)(cs);
  21. Replies
    4
    Views
    7,637

    scanf("%s", &DataInput); // don't need '&'...

    scanf("%s", &DataInput);

    // don't need '&' since it's an array

    scanf("%s", DataInput);
  22. Replies
    6
    Views
    2,389

    well then yes it would mean that he has dynamic...

    well then yes it would mean that he has dynamic libraries. Its like Dx, i have the Dx SDK with all the .lib files, but on the bottom of most game boxes now it says "requires directx". that doesn't...
  23. Replies
    6
    Views
    2,389

    i dunno if it's just me, but i'm alittle...

    i dunno if it's just me, but i'm alittle confused. U mean, u compile the app and ur friend runs it or u both compile it?

    u would use static libraries over dynamic libraries if the program depends...
  24. Replies
    14
    Views
    1,585

    oh gee, i'm half asleep, it doesnt work on the...

    oh gee, i'm half asleep, it doesnt work on the array because data->sdSensor[n_sensor].ssName is type unsigned char[]. U can't pass an unsigned char[] or unsigned char* to strlen. sorry about that.
    ...
  25. Replies
    14
    Views
    1,585

    first one, u can't convert unsigned char[] to...

    first one, u can't convert unsigned char[] to char*

    in other words u can't have



    char *pc = 'l';
    unsigned char *upc = pc;
Results 1 to 25 of 51
Page 1 of 3 1 2 3