Search Result

Collapse
10 results in 0.0013 seconds.
Keywords
Members
Tags
char
  •  

  • Noodles
    started a topic scanf problems with strings and chars
    in C

    scanf problems with strings and chars

    Hi,

    Im quite new to C++ and am trying to learn most of the commands.
    So i wanted to make a Programm that has a normal mode and a non normal mode, kindof.
    And i wanted to make a question, which the user has to answer to start normal or unnormal mode.
    I think this code should show my idea.

    The if command never Reacts to a j.
    Why is that??

    Code:
      char jon;
    ...
    See more | Go to post

  • in Embedded C, how to convert a Returned Hex value in the form of “Unsigned Char”

    We are writing a code for I2C interface,
    where we are reading a 16 bit Hex number as two 8 bit Hex MSB and LSB, and we are returning these values as "Unsigned Char".

    we want to concatenate these MSB and LSB "char" values, and finally we need one "Integer" value for our further processing.

    for example: the following 2 methods are returning one "Unsigned Char" value, each...
    See more | Go to post

  • What is the difference between string and String ? when is each one used ?

    HI ! I am expirienced C++ programmer , but new to C#

    1. What is the difference between string and String ? when is each one used ?

    2. I tried to use "ToCharArra y" , because I need the text in simple characters array.
    Code:
    	private System.Windows.Forms.TextBox UserName ;
            char [] name1;
            name1 = new char [64];
            name1 = this.UserName.Text.ToCharArray();
    ...
    See more | Go to post
    Last edited by Niheel; Feb 7 '11, 11:33 PM.

  • Why doesn't character datatype take up more than one character ?

    Hello.
    I use BlueJ 3.0.1
    I am writing a program to dictionarize words(arrange words in dictionary order).

    But the 'char' type isn't working properly.

    Code:
    char ch1 = 'qwerty' ;//shows error
    char ch2 = 'qwedrt';
    if(ch1>ch2)
    {
    System.out.println(ch2);
    System.out.println(ch1);
    }
    else
    {
    System.out.println(ch1);
    System.out.println(ch2);
    ...
    See more | Go to post

  • EnlightenedOne
    started a topic Marshalling data to a char array
    in C

    Marshalling data to a char array

    Hey there I have a data structure with a set size of 40 I want to marshall the data from an object into an array of characters for simplistic transmission of data. I am aware of serialization but only familiar with it in higher languages, I am stuck using c.

    My question is this. How do I point to an individual character value of the unmarshalled object in order to marshall it into a character array I can throw down the socket pipe?...
    See more | Go to post

  • jmoschetti45
    started a topic Random int 1-255 to character in C
    in C

    Random int 1-255 to character in C

    I have a function that returns an integer, between 1 and 255. Is there a way to turn this int into a character I can strcmp() to an existing string.

    Basically, I need to create a string of letters (all ASCII values) from a PRNG. I've got everything working minus the int to char part. There's no Chr() function like in PHP.
    See more | Go to post

  • mdonders
    started a topic Char Pointer from C++ DLL

    Char Pointer from C++ DLL

    I recently converted my application into C# as VS2008 does not support new Data Sources (?!), but now I am stuck on one command from the old DLL.

    Here is the old function declaration and command that worked in C++:
    Code:
     typedef short(*pfunc2)(short address, LPSTR cmd, short irqnum);
     pfunc2 pfSendAT6400Block	=	(pfunc2)GetProcAddress(hndl, "SendAT6400Block");
    
    char *testCommands[258] = {"A100:V50:D254000:GO1:"};
    ...
    See more | Go to post

  • BurnTard
    started a topic Can I concatenate a char[] and int?
    in C

    Can I concatenate a char[] and int?

    I'm making a program that is supposed to change certain input and leave most unchanged, and then spit out an output. I decided I should store the output in a single char[] before writing it out, so I could build on the program later, however doing this I ran into an issue. Anyway, the main.c is attached as a txt.

    Changing all the stuff seems to work fine, it's just that adding the normal characters isn't working. I get warnings, and...
    See more | Go to post

  • JSchaenzle
    started a topic Converting a char to an int
    in C

    Converting a char to an int

    I am trying use the following code to convert a char to an int but it's not working.
    For some reason PosToMoveTo contains 4000 instead of 4. I am not sure why...

    main()
    {
    int i;
    int dis;
    char * Distance;
    char N0, N1, N2, N3, N4;
    int PosToMoveTo;
    ReceivedStr = "P0004";

    N0 = ReceivedStr[0];
    N1 = ReceivedStr[1];...
    See more | Go to post

  • halljkl
    started a topic C++ : Do not allow letters in a float validation?
    in C

    C++ : Do not allow letters in a float validation?

    I have to create a program that has validation in it, The programme asks the user for the weight of a package, and sets the cost appropriately, I have a do in place do that if the user types in a minus number it gives them an error.

    do{
    clrscr();
    cout<<"\n Enter the weight of the package to be delivered ";
    cin>>weight;
    if(weight<0)
    {
    cout<<"\n Error! ENTER...
    See more | Go to post
Working...