Sponsored Content
Top Forums Programming how to covert string into 2 diff int Post 302315221 by xiaojesus on Monday 11th of May 2009 11:39:23 PM
Old 05-12-2009
thanks but can help me convert to c++?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to convert a string to int

Hi, i want to read a text file whose content(single line) will be a number like 1 or 2 or 3 ..... what i want to do is to read the file and increment the content of the file, using unix scripting. Regards, Senthil Kumar Siddhan. (2 Replies)
Discussion started by: senthilk615
2 Replies

2. UNIX for Dummies Questions & Answers

int open(const char *pathname, int flags, mode_t mode) doubt...

hello everybody! I want to create a file with permissions for read, write, and execute to everybody using C, so I write this code: #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> int main(){ int fileDescriptor; fileDescriptor =... (2 Replies)
Discussion started by: csnmgeek
2 Replies

3. Shell Programming and Scripting

Compare string output to int value?

Hi, i'd like to implmeent emergency shutdown script in case our AC dies and the temperature rises too high. I can get core temperatures with: sensors | grep Core | cut -c15-16 Result is: 23 18 18 13 21 18 15 17 How can I check if any of the cores is above eg. 80 (that's C of... (2 Replies)
Discussion started by: zapp0
2 Replies

4. Shell Programming and Scripting

From string to int ?

hello guys i m new to shell scripting and can't find out why this structure is not right I m guessing this happens because $LINESUM is a string . so how can i do this ? i want my script to do so many loops as the number of the lines of one custom file. #!/bin/bash echo give me path name... (5 Replies)
Discussion started by: xamxam
5 Replies

5. Programming

Handle int listen(int sockfd, int backlog) in TCP

Hi, from the manual listen(2): listen for connections on socket - Linux man page It has a parameter called backlog and it limits the maximum length of queue of pending list. If I set backlog to 128, is it means no more than 128 packets can be handled by server? If I have three... (3 Replies)
Discussion started by: sehang
3 Replies

6. Programming

How to pass int and return string in C?

hi I want to write a function which takes int as input and returns a string like this. char GetString(int iNo) { switch(iNo) { case 0: return "Zero"; break; case 1: return "One"; break; } } void main() { int i; printf("Enter... (1 Reply)
Discussion started by: atharalikhan
1 Replies

7. Shell Programming and Scripting

Bash shell script: Str(007) to int(7),increment it(8) & convert back to string(008)

Hi, I have the following requirement. There will be following text/line in a file (eg: search-build.txt) PRODUCT_VERSION="V:01.002.007.Build1234" I need to update the incremental build number (eg here 007) every time I give a build through script. I am able to search the string and get... (4 Replies)
Discussion started by: drwatson_droid
4 Replies

8. Programming

IPv4 string->int

Does anyone know how to convert a IP address given as 'string' into a 'u_int32_t'? Are there any build any functions already? (1 Reply)
Discussion started by: Freaky123
1 Replies

9. Programming

Splitting string and storing in int

I have a string containing 2 integers separated by /, for example 12/8 or 8/6 am want to store the numbers in two integers. (3 Replies)
Discussion started by: kristinu
3 Replies

10. Shell Programming and Scripting

Convert int to string in python

Hi, I have column 5 in a file which contains string like this for ex. RP11-125O5.2 SLCO1B1 CAPN1 FRMPD2 TXNL4B So I do by data = )] ValueError: invalid literal for int() with base 10: 'R' Can someday tell me how to convert this column into int successfully. Thank You in... (7 Replies)
Discussion started by: rossi
7 Replies
mcx convert(1)							  USER COMMANDS 						    mcx convert(1)

  NAME
      mcx convert - convert between mcx storage types

  SYNOPSIS
      mcx convert <matrix-file-in> <matrix-file-out>
      mcx convert [--write-binary] --cone-to-stack <cat-file-in> <cat-file-out>
      mcx convert [--write-binary] --stack-to-cone <cat-file-in> <cat-file-out>

      mcxconvert  is  not  in  actual fact a program. This manual page documents the behaviour and options of the mcx program when invoked in mode
      convert. The options -h, --apropos, --version, -set, --nop, -progress <num> are accessible in all mcx modes. They are described in  the  mcx
      manual page.

      mcx  convert  [--cone-to-stack  (transform  cone	file to stack file)] [--stack-to-cone (transform stack file to cone file)] [--write-binary
      (output native binary format)] [--cat (read and write cat format)] [-cat-max <num> (limit the stack conversion to <num> matrices)]

      In the two-argument invocation without additional arguments, mcx convert converts from the format found in the first file to the other  for-
      mat, i.e.  from native interchange to native binary format or the other way around. When querying with the -q option, mcx{convert} will out-
      put a one-line synopsis describing the matrix in the argument. The --cone-to-stack and --stack-to-cone options convert between the two types
      of concatenated output provided by mclcm.

  DESCRIPTION
      The  mcl	libraries make extensive use of matrices. Matrices are used to encode graphs, matrices and clusterings.  They can be stored either
      in interchange or in binary format. The latter is somewhat more efficient in storage and much faster in both reading and	writing,  but  the
      default is interchange format.

      The  mcl input routines recognize the type of storage they are dealing with. If you want to convert a matrix to the other storage type, sim-
      ply specify the file name of the matrix you want to convert.  mcx convert will recognize its type, and write the	other  type  to  the  file
      specified as the second argument.

  OPTIONS
      --cone-to-stack (transform cone file to stack file)
	This option requires two trailing options, the names of respectively the source cone file and the target stack file.

      --stack-to-cone (transform stack file to cone file)
	This option requires two trailing options, the names of respectively the source stack file and the target cone file.

      --cat (read and write cat format)

      -cat-max <num> (limit the stack conversion to <num> matrices)

      --write-binary (output native binary format)
	This option is only useful with either of the options --cone-to-stack, --stack-to-cone, or --cat.

  AUTHOR
      Stijn van Dongen.

  SEE ALSO
      mcxio(5), and mclfamily(7) for an overview of all the documentation and the utilities in the mcl family.

  mcx convert 12-068						      8 Mar 2012						      mcx convert(1)
All times are GMT -4. The time now is 01:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy