Search:

Type: Posts; User: Konstantinos

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    3
    Views
    1,098

    Greek characters in gcc

    Hello guys.I have a simple problem.


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

    int main()
    {
    char c=getc(stdin);
    if (c=='φ')
  2. Replies
    5
    Views
    797

    Thank you.I thought that we use %d to print a...

    Thank you.I thought that we use %d to print a double,%f to print a float etc.
  3. Replies
    5
    Views
    797

    Double and float print

    I believe the time has come to ask a stupid question.
    Why does this work

    double d1=1;
    double d2=2;
    printf("%f\n",d1/d2);

    and this doesnt

    double d1=1;
  4. Replies
    2
    Views
    778

    Pointer to pointer question

    What is the difference between

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

    int dothings(char **k){
    printf("%c",*k);
    }

    int main(){
  5. Replies
    10
    Views
    855

    I am using the while loop to insert in a sorted...

    I am using the while loop to insert in a sorted linked list and i have already taken care of the case that my list is empty.



    The code that i used for my question was already part of a program...
  6. Replies
    10
    Views
    855

    Thanks!

    Thanks!
  7. Replies
    10
    Views
    855

    Is this safe to do?

    Hello.A quick question

    while (currentP->next!=NULL && currentP->next->pid < tempP->pid)
    {
    currentP = currentP->next;
    }
    Considering the fact that...
  8. Replies
    2
    Views
    593

    Thanks for your time.

    Thanks for your time.
  9. Replies
    2
    Views
    593

    Traversing a linked list

    Hello,

    Let's say i have a struct

    struct node
    {
    int item;
    struct node *next
    };
  10. Replies
    2
    Views
    827

    Thanks.This was just the case where the first...

    Thanks.This was just the case where the first list was empty,i am about to implement the second case now.
  11. Replies
    2
    Views
    827

    How is this happening?(linked lists)

    Hello,i am getting something strange and unfortunetely i dont understand it.



    #include "LinkedList.h"

    void concatenate(LinkedList<string>& object1,LinkedList<string>& object2){
    ...
  12. Replies
    2
    Views
    1,127

    Nevermind,i fixed it.My project in visual c++ was...

    Nevermind,i fixed it.My project in visual c++ was not set in console mode.
  13. Replies
    2
    Views
    1,127

    Linked list trouble

    Hello guys i am trying to create a linked list with templates but i am having some trouble.
    Header file:

    #include "../std_lib_facilities.h"
    #include <iostream>

    using namespace std;

    ...
  14. Replies
    1
    Views
    6,793

    A simple calculator

    Hello guys,i have an assigment which includes an exercise about creating a calculator gui(fltk).This is the algorithm used from professor Stroustrup without the gui.


    //
    // This is example code...
  15. I dont get why sizeof(*allWords) and what is the...

    I dont get why sizeof(*allWords) and what is the meaning of it in this situation.Thanks everyone for helping me and for there valuable time.
  16. The problem is that i dont know the number of...

    The problem is that i dont know the number of words i am about to fscanf so i need to put them to a temporary place,and than later place them in a dynamic array(therefore i need to count the amount...
  17. Declaring one more variable crashes program.

    Hello guys.I am having this problem and i cant understand why.This my code

    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    int main(){
    FILE *fp;
    int c;char *str;
    int str_n=0;...
  18. Replies
    12
    Views
    2,705

    Wow thanks.I am doing this just for...

    Wow thanks.I am doing this just for checking.fscanf reads until whitespace,therefore i use loop in order to print all my text.
  19. Replies
    12
    Views
    2,705

    Hello guys,thanks for the responses. Thus far i...

    Hello guys,thanks for the responses.
    Thus far i have done this.

    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    int main(){
    char **A;
    char *fn;
    int n,i;
  20. Replies
    12
    Views
    2,705

    Need help reading from txt

    Hello guys.I need to read a text file which includes a paragraph of plain text.I need to put this paragraph in an array,where each array entry is one word.For example the text <I am superman> will be...
  21. Replies
    8
    Views
    2,755

    Sorry,i found the problem.It is beacause i used...

    Sorry,i found the problem.It is beacause i used '\0' for blank and it didnt work.Instead ' ' worked.If anyone could explain that would be nice.Thanks for the replys.
  22. Replies
    8
    Views
    2,755

    it asks where to place the 'X' and the computer...

    it asks where to place the 'X' and the computer responds with 'O'.
  23. Replies
    8
    Views
    2,755

    Trouble printing tic tac toe

    Hello guys i have trouble printing tic tac toe display board.I am using putty to connect to my uni computers which run debian.

    printf("\n");
    printf(" %c | %c | %c\n", a[0][0], a[0][1], a[0][2]);...
  24. Replies
    5
    Views
    1,349

    they told us to use toupper()..

    they told us to use toupper()..
  25. Replies
    5
    Views
    1,349

    So why this doesnt work? int main() { ...

    So why this doesnt work?




    int main()
    {
    int m=0;
    int i;
Results 1 to 25 of 26
Page 1 of 2 1 2