Questions tagged as 'string'

1
answer

Convert String to Double while maintaining content

I need in Java to convert a String that has a binary value (Ex: "0111010") to a double . I tested: String teste = "101010101"; double number = Double.parseDouble(teste); System.out.println("The number is: " + number); But the o...
asked by 04.05.2016 / 05:47
1
answer

Segmentation fault function fgets

I'm having a segmentation fault problem opening txt files. I know for handling strings , higher level links, however I can not learn now, so I'm using C . My problem is to read a list with four thousand files name, whos...
asked by 26.01.2016 / 18:16
1
answer

Insert current date into a field [closed]

I am using% co.de% of .Net to create a project as a learning base for BD with C #. I chose an easier way that would be to work most of the time in design mode through dataAdapters . The battle I face is to insert the current date into a DB...
asked by 13.12.2015 / 02:51
1
answer

Why can not I change the string this way?

When we have an int variable declared, and then a pointer to that variable: int x = 10; int *p = &x; To modify the variable x through the pointer, we have to do: *p = 20; However, when I declare: char *string = "ABCD"; And I t...
asked by 08.12.2015 / 17:21
1
answer

Display a TimeSpan formatted time

I have two variables: TimeSpan horaI = new TimeSpan(10, 00, 00); TimeSpan horaF = new TimeSpan(22, 00, 00); I need to display them on the screen as follows 10:00 AM and 10:00 PM. But I can not do it. How could I do this?...
asked by 10.11.2015 / 14:24
1
answer

Function "strstr ()" is not locating what I expect

#include <stdio.h> #include <string.h> char tracks[][80] = { "I left my heart in Harvard Med School", "Newark, Newark - a wonderful town", "Dancing with a Dork", "The girl from Iwo Jima", }; void find_track(char sear...
asked by 04.01.2016 / 21:41
1
answer

Concatenate string with integer vector and write to file?

I have a dynamic integer vector. For example: 1 2 4 6 8 9 10 I want to attach it to a string, like this, for example: [B]: And write this to a file line, then read the file with the following output, for example, assuming the program...
asked by 05.12.2015 / 21:45
1
answer

Exit the loop as soon as the string name equals 0

#include <iostream> #include <locale.h> #include <stdlib.h> #include <stdio.h> #include <string.h> using namespace std; int main() { setlocale(LC_ALL, "portuguese"); int idade[20]; string nome[20]; ch...
asked by 02.11.2015 / 16:35
1
answer

Convert String to Monetary Value in ASP.Net MVC

How to convert the result of a multiplication within a string to display as Real? The value of bol.ValorBoleto is loaded a little earlier. Data annotation : [DisplayFormat(ApplyFormatInEditMode = false, DataFormatString =...
asked by 18.08.2015 / 14:38
1
answer

c # delete drawstring in picturebox

I have a pictureBox where the user at each click of the mouse inserts a text on top of an image in a pictureBox. It inserts several texts in several points of the image, the inserted text gets picked up from checkboxes. Using this code pri...
asked by 02.08.2017 / 18:45