Mar!o
Yes. They are like void *const because their address cannot be changed afterwards to they also point to the same object.
Mar!o
But remember there is a big difference between l-value references like: int&, r-value references like: int&& and forwarding references like: T&&
Mar!o
Oh okay right. I'm not in that state of the art :P But It's also possible to overload methods for l and r value references, which is pertty awesome!
Mar!o
In good old C we only have pointers :)
YD👺
Hi
YD👺
How can I edit a command package in linux
Narendra Modi
Hello everyone , I am a beginner , Can you pls tell me how to limit the integer values , while taking inputs from a file in a c program
Renan
Renan
Narendra Modi
What do you mean? 🤔
I am taking input of integers in a c program from a text file ,text file has 20 values , can you pls tell how , how can i limit the value of taking only starting 7integers
Renan
Narendra Modi
@Chhotu
Why warning rose
Emir
Renan
yess
You just have to read 7 lines of the file. Assuming the file looks like this:
54
654
12
5
...
Renan
If not, specify the format.
@Chhotu
Write the name of feature of object oriented programming used in the following program jointly illustrated by the function (I) to 4.
Renan
I think you can post paste bin. 🤔
Anonymous
Narendra Modi
Anonymous
Renan
Narendra Modi
Emir
Emir
but if only one spaces between two integers
Narendra Modi
Open and read a file of integers into an array that is created with the first integer telling you how many to read.
So 4 9 11 12 15 would mean create an int array size 4 and read in the remaining 4 values into data[].
Then compute their average as a double and their max as an int. Print all this out neatly to the screen and to an output file named answer-hw3.
this was the whole question , I have to solve , I know the rest , but can't understand how to solve the second line
Dima
Dima
1, 3. bruh
Anonymous
Renan
Narendra Modi
Narendra Modi
Tiakuh_San
Im comparing two arrays that I've returned from a function but im having a issue
Tiakuh_San
I have to loop each array item but i need a way to make it stop withou acessing unwanted memory.
Tiakuh_San
Is there a way i can mark the array end?
Tiakuh_San
So in the loop it breaks when reaching it?
Tiakuh_San
I have it returning 2, 5, 172737383, 373737373, the only useful values are in the the 0 and 1 position
Renan
Renan
Tiakuh_San
Thats the thing, the array is created dinamically. I do not know where this ends...unless i can mark its end in the array (like a null value or something) or return both the array and an counter
Taylor Rose
why, after clearing the line, I have so much indentation there, to write a new value, where str and output are the lines
Tiakuh_San
What if i mark as a negative value? ,🤔
Renan
Taylor Rose
I have the result written in the string in 'output', and I need to 'output' the entire value to '\n' and save it in "str", and then delete the string str and write it again to '\n'
Tiakuh_San
I was able to work with it using a -1. But i will revisit this situation again
Tiakuh_San
I do define the max lenght, but not all of it is being used... if the array is 100 but the values I need are only the first 5, then i will access values that i dont want if i define the sizeof array right? At least that was my output...a lot of trash after the good values...
❣️
❣️
Answer for this?
Francisco
Answer for this?
What have you done so far? I hope you don't expect us to do it for you
Renan
YK Y
please suggest any good tutorial for bitmask?
Narendra Modi
Alion🦁
Hi, guys
Alion🦁
Where I can find C++ tests?
Dima
because its international
Tushar Goel
#include <stdio.h>
#include <string.h>
int main() {
int a;
scanf("%d",&a);
getchar();
char c[20];
gets(c);
printf("%d\n",a);
puts(c);
return 0;
}
Tushar Goel
what is the use of getchar
Tushar Goel
Sorry
Tushar Goel
I am asking what is the use of getchar()
Emir
Tushar Goel
Emir
Emir
This program is wait until press some key because of getchar
Tushar Goel
Sorry for the but can you please elaborate
Emir
Tushar Goel