Questions tagged as 'string'

2
answers

String reading with two or more names

How do I read a string with a compound name for example: "Vitor Martins"? I'm doing this program that stores a student's name and grade, but it gives a bug when entering two names. #include<stdio.h> #include<string.h>...
asked by 24.09.2016 / 15:58
1
answer

Complete Range Argument in Swift 3.0

I was normally using this code in a Swift 2.0 project, then I decided to update the project to version 3.0 and adapt some functions that have changed ... Only the last "range" argument I can not adapt. Swift 2.0 code: if let range = string....
asked by 26.07.2016 / 00:56
1
answer

How to get the line below (next row) in C?

Good morning people, I have a file that contains several lines, including the following: REMARK Evaluations: CoarseFF Proper-dihedrals Coarse Atomic Repulsion Coarse Compaktr Hbond_Strands Hbond_Angle_Dist_var_power_Strands Hbond_AHelixes...
asked by 04.12.2016 / 13:14
1
answer

Receiving Data and Converting to String

byte[] ret = new byte[29]; s.Receive(ret); Console.WriteLine("Retorno de Dados" + (System.Text.Encoding.ASCII.GetString(ret).Replace("211",""))); string tex = System.Text.Encoding.ASCII.GetString(ret).Replace("211 ", ""); switch (tex) {...
asked by 11.05.2016 / 22:41
1
answer

Converting vector from char to string - C ++

#include <iostream> #include <string> #include <vector> using namespace std; int main () { string vet[10], aux; std::vector<char> name; int count=0, sum=0; while (count<10) { getline(cin, aux...
asked by 22.02.2016 / 14:49
2
answers

How to accumulate strings in a single variable?

I'm trying to retrieve the attachment names in a single variable and then print them all together. Note that each file is already uploaded to the upload folder. So this is not the case. I really just want to retrieve the names of those attachmen...
asked by 02.03.2016 / 17:36
1
answer

Doubt about the use of 'for' in voting system

I want to make a program where the user gives the number of candidates and their names, and then the voting is started until the user types end. Help? #include<stdio.h> #include<string.h> int main() { char nome[30][30]; ch...
asked by 07.06.2015 / 20:43
2
answers

Does not display the string, in C

I'm having trouble copying string in C, this does not want to work. #include <stdio.h> #include <stdlib.h> int main() { int count; char str1[20] = "Hello World", str2[20]; for(count = 0; str1[count]!='#include <stdi...
asked by 17.05.2015 / 19:28
2
answers

What is the strategy to identify a correct answer, without an exact comparison of String?

I have a program in C # that is like a QUESTIONNAIRE, however instead of alternatives there are times when the user must enter a response. The answer to the question is stored in a database and at that time the program only considers the respons...
asked by 03.05.2015 / 17:47
1
answer

How to choose position to print a string in a text?

I'm developing an app where the user can choose between a text, the position where the output value of a string should be printed.  Example:  Normally when we print a string in the middle of a text we do this: NSLog (@" Um texto com:%@", minh...
asked by 16.03.2015 / 19:48