Sag
Gdb
Okay thanks let me watch its tutorial😅
Anonymous
Okay thanks let me watch its tutorial😅
Btw just curious. What is the point of all that code? Do you want to swap nodes at position i and j?
Sag
Actually yess
Anonymous
Actually yess
Cant it be a simple case of: Node* pos_i = Node at pos i; Node* pos_j = Node at pos j; using std::swap; swap(pos_i->data, pos_j->data);
Anonymous
Will it work??
In C++ yes. Just do sanity checking on indexes I and j....retrieve the nodes there and swap just the data values there. Should be 6 lines of code at the most.
Sag
OMG
Sag
Sorry I'm new here
Sag
What's this group for??
Anonymous
I almost feel like this one is stolen too
I doubt it. No one would write such a huge chunk of code for swapping 2 nodes and share it as an accomplishment on the net. The OP most likely wrote it on his own and is just asking for help.
Anonymous
What's this group for??
For discussing C and C++ related questions.
Anonymous
Hello guys . I can not understand how this code generate mle (memory limit exceeded error ! And max num is 10 pow 4) https://pastebin.com/gzYwnxHj
Anonymous
Hello guys . I can not understand how this code generate mle (memory limit exceeded error ! And max num is 10 pow 4) https://pastebin.com/gzYwnxHj
Errm.10^4 output operations with constant flushing of the buffer is definitely going to take some time.
Pavel
Yeah, better to replace std::endl with "\n"
Nameful
Unless you want to flush
Pavel
But it shouldn't do anything with memory anyway, and the array is 4*10^3 bytes should fit on stack also I think
𝕮𝖍𝖊𝖙𝖆𝖓∆
Can anybody send merge sort program
André
google has plenty available....
klimi
Can anybody send merge sort program
no, we don't do that here
A1
for(each z from 0 to 2) does this loop run till 2 or till 1
A1
if(1<1) returns?
A1
In pseudocodes
Levy
Can anybody send merge sort program
Google is your best friend
Anonymous
But it shouldn't do anything with memory anyway, and the array is 4*10^3 bytes should fit on stack also I think
I thought it was a time limit exceeded issue. Just realized that it is a memory limit exceeded issue. Not sure why he is getting memory issues for that code.
VENUJAN
#include <stdio.h> int main() { int n = 1; int start; int input_num_terms,even_num; printf("Enter the number of terms : "); scanf("%d ", &input_num_terms); while (n <= input_num_terms) { printf("Enter the starting value : "); scanf("%d",start); even_num = start + 2; printf("%d \n",even_num); n++; } return 0; }
VENUJAN
whats wrong with my code?
VENUJAN
Enter the number of terms : 4 6 Enter the starting value : -------------------------------- Process exited after 5.867 seconds with return value 3221225477 Press any key to continue . . . ————this is output
smene
Hi guys. I would like to create the menu on right, which UI library do you suggest? https://img.gta5-mods.com/q75/images/endeavor-mod-menu/414f6f-QWaYhaE.jpg
Anonymous
Hi Guys, I am looking for an assignment on POINTERS to evaluate my understanding and explore pointers... Do you have any resources with complex problems using pointers ? Thank you in advance.
Anonymous
Okey
Gabriel
The "Meson" Build Systems is getting space in the C/C++ community or not?! I think that the Meson is the more user-friendly build system in the comparison with the CMake!
Anonymous
The "Meson" Build Systems is getting space in the C/C++ community or not?! I think that the Meson is the more user-friendly build system in the comparison with the CMake!
There is already a build system called Build2 which is being adopted by many C++ developer communities as an alternative to CMake. It is based on Rust Cargo design without its shortcomings.
Anonymous
Hmm, I will look about it!
https://build2.org/
Paul Pogba
Hello guys i need a pdf where i am going to learn how to use files in C++
Anonymous
Google not sufficient?
A simple google search is enough lol
Anonymous
Paul https://duckduckgo.com/?q=file%20IO%20in%20C%2B%2B https://www.learncpp.com/cpp-tutorial/basic-file-io/
Anonymous
oh no, i meant Paul
G
By the way, do you know fast_ IO?
G
A C + + third party Library
G
But it is more than 10 times faster than the C + + standard library io
Anonymous
ok
.
I am learning c language but I am facing problem.
.
Which software is best for c programming in phone?
Anonymous
Which software is best for c programming in phone?
Why not use pc? Really... for Python maybe but for C/C++/Java ?
Anonymous
but Maybe brakeys?
Anonymous
tbh just don't do it
Puspam
Which software is best for c programming in phone?
CppDroid - works offline Online Compiler - requires internet connection, but support many languages
Anonymous
Thanks
why are you even programming in C++ on a phone
.
why are you even programming in C++ on a phone
my pc is not working since yesterday
Anonymous
my pc is not working since yesterday
Ok but to write/edit any more than 10-20 lines of code on the phone .. arrrgh
Anonymous
Ok but to write/edit any more than 10-20 lines of code on the phone .. arrrgh
I'd say just try to fux your pc instead of programming
VENUJAN
#include <stdio.h> int main(){ int i = 1; int input_num ,cube; printf("Enter the range : "); scanf("%d ", &input_num); while (i <= input_num){ cube = (i*i*i); printf("Cube of number %d is %d \n",i,cube); i ++; } } ———————-why it's taking 2 inputs?
VENUJAN
Enter the range : 7 5 Cube of number 1 is 1 Cube of number 2 is 8 Cube of number 3 is 27 Cube of number 4 is 64 Cube of number 5 is 125 Cube of number 6 is 216 Cube of number 7 is 343 -------------------------------- Process exited after 7.935 seconds with return value 7 Press any key to continue . . . i wanted to enter tow numbers.....why?
Hanz
oh you want to enter two numbers? use "%d %d" (there is a space between %d)
VENUJAN
remove the space after %d
thanks its working.
Hanz
yoyoi
.
#include <stdio.h> int main(){ int i = 1; int input_num ,cube; printf("Enter the range : "); scanf("%d ", &input_num); while (i <= input_num){ cube = (i*i*i); printf("Cube of number %d is %d \n",i,cube); i ++; } } ———————-why it's taking 2 inputs?
#include <stdio.h> int main(){ int i = 1; int input_num ,cube; printf("Enter the range : "); //scanf("%d ", &input_num); remove space scanf("%d", &input_num); while (i <= input_num){ cube = (i*i*i); printf("Cube of number %d is %d\n",i,cube); i++; } }
Anonymous
Can anyone send me c++ project code on inheritance
Anonymous
For college mini project
Hiaz.. school project... pls google...
Anonymous
Can anyone send me c++ project code on inheritance
https://google.it before asking heh
da
https://timsong-cpp.github.io/cppwp/n4868/cpp.replace#cpp.subst-1.2 Hello everyone, my English is not good. Can someone explain this
da
😂.
Anonymous
https://timsong-cpp.github.io/cppwp/n4868/cpp.replace#cpp.subst-1.2 Hello everyone, my English is not good. Can someone explain this
Read this : https://www.scs.stanford.edu/~dm/blog/va-opt.html Especially the part about where the substitution bit is cleared and the replacing bit is true. The examples there cover the particular scenario where the standardese that you have quoted is used.
Ale
Hello guys, how are you? I have a quick question, are we allowed to share job opportunities here?