Anonymous
Thanka alot
Anonymous
Link dead
Anonymous
Please suggest another one if you can
Kumar
It's not. Coming plz help me how to print negative numbers In given array
Anonymous
Yes
Pavel
It's not. Coming plz help me how to print negative numbers In given array
1. Don't post photos, use pastebin or at least.. make a screenshot 2. If you have a compilation error, you can past the error here, so we won't guess what the compiler told you 3. oh my god.. these indentations, my eyes are bleeding when I try to read this code
Anonymous
Use sizeof operator to get array size and then fit it in termination of loop
Jussi
Sorry for offtopic, but is anyone proficient in regex here?
Asdew
Just ask your question.
Asdew
Like, for example, I am definitely not proficient, but I might be able to help.
Nameful
Not great though
Jussi
May I PM you?
Nameful
I would say ask here, but I'm not sure it's allowed
Nameful
I suppose you could use regex in C++ though?
Asdew
Ask here. If you're scared, just make some C++ program using Regex and say the Regex is for that program.
Dima
nah you can
Nameful
nah you can
regex is ok here?
Dima
yesssss
Jens
hello, I iam little bit in struggle. I don't get the right solution. In the text.txt file are names and they are separated by spaces and tabs. I can only search with argv after the first word in the file and get the right solution. Can someone pls help me, who knows how I move to the next word FILE *fp = fopen("text.txt", "r"); single = fscanf(fp, "%s", input); fund = strstr(input, argv[1]); if(fund != NULL) {     printf("1"); }  Thank you very much
Jens
only C and thank you, I will try it :)
Anonymous
std::string str="abc",r; std::stringstream s; s<<str[0]; s>>r; A way to convert a single char to string. Why does the stream puts str[0] into r by doing s>>r ? I though after s<<str[0], r = s.str() should have been done.
Pavel
In one case you pull one value, in another you form a string out of the stringstream buffer if there's one value, the result is the same
Anonymous
ok so after s>>r nothing is left in stream but on the other case stream still contains "abc". Right?
kaptan
hey ,i have a problem with writing a c code for this question because i dont really understand what atoi functions really do , could you please help me ?
kaptan
Anonymous
easy
kaptan
unfortunately i dont understand , until we use atoi function , are the numbers with string function actually characters?
Dima
everything in string is a character
kaptan
thanks
kaptan
i couldnt write a code for this ,can somebody help me?
kaptan
i know this is easy but i m new at programming so it is actually hard for me
Anonymous
To not be a beginner you have to write it yourself
kaptan
you are right :( , well i dont actually understand the question , if our string is actually numbers , and it says length of the string , what am i suppose to find as a length , i mean let s say my string is 16 , is the length i should find is 2 ?
Joan
Nothing
Anonymous
Hii
klimi
Anonymous
How to learn c++
Anonymous
I'm in 12 class with computer science
klimi
How to learn c++
You need yo practise it IG ..
Anonymous
IG???
Anonymous
Which software is best for programming
klimi
Which software is best for programming
Doesn't matter much. Just dont use turbo c++
Anonymous
Okkk
Anonymous
I have
Anonymous
Hello I need help please
Anonymous
Can i put xml and data files in one dll file?
Anonymous
https://social.msdn.microsoft.com/Forums/vstudio/en-US/6449cc10-d38a-4fef-a606-2a8273b98a94/include-xml-file-into-dll?forum=netfxbcl
Jens
The answer helped me, thank you. But I have one more question. The problem is, if I search for "pattern" with "strstr", it also counts the results "patternman" "patternwoman". But it should only look for exactly this one word.
-_-
anyone pls explain why ~0 is -1 , not 1
Григорий
~ is operation that inverts bits. 0 is 00000000 (binary), ~0 is 11111111(binary), 11111111(binary) is -1. 1 is 00000001(binary).
Григорий
11111111 is -1 ? how ?
Signed integer.
-_-
Signed integer.
pls explain 😟
jot.rs
what is maening ~0??
~ is C operator to invert bits of a number
-_-
how to convert 11111111 bits ?
-_-
bcz i am doing like this 2^0*1 + 2^1*1 and so on
Григорий
pls explain 😟
00000001 is 1 00000010 is 2 Ok? 01000000 is 64. Do you get it?
Григорий
First bit is the sign. 0 is +. 1 is -.
Serhii
pls explain 😟
To make negative number, you need to invert bits and add 1. So 1 is 00000001 -1: Inverse: 11111110 Add 1: 11111111
عزة