AHMED
Yes blue tea I typed cout and it worked. Thank you.
🅆🄰🄶 𝑥 🄴🄻 🅀🅄🄰🄳🅁🄰
🅆🄰🄶 𝑥 🄴🄻 🅀🅄🄰🄳🅁🄰
I don't mean to be rude,,, but why?
It is a good question for me because a wanna be a programmer
klimi
It is a good question for me because a wanna be a programmer
sure, but why should others suffer because of you?
🅆🄰🄶 𝑥 🄴🄻 🅀🅄🄰🄳🅁🄰
sure, but why should others suffer because of you?
Is that a problem if i will be a programmer for others or do you wanna say why others teach you without any payment?
klimi
i don't know what are your sources
🅆🄰🄶 𝑥 🄴🄻 🅀🅄🄰🄳🅁🄰
i don't know what are your sources
In other way if you dont want to teach me please send me links which can be sources of coding videos in private inbox chat
Anonymous
Helo anyone here can help me in my coming exam
Anonymous
C programming
klimi
In other way if you dont want to teach me please send me links which can be sources of coding videos in private inbox chat
https://www.youtube.com/user/TheChernoProject https://www.osdev.org/ https://en.cppreference.com/w/ https://www.youtube.com/user/Bisqwit https://www.youtube.com/channel/UC-yuWVUplUJZvieEligKBkA https://www.youtube.com/channel/UCZUyPT9DkJWmS_DzdOi7RIA https://www.youtube.com/c/ChiliTomatoNoodle https://web.stanford.edu/class/cs106b/ https://www.learncpp.com/ https://learnopengl.com/ https://www.youtube.com/channel/UC1dkO571jGLzSJcsOE-ESZg https://www.youtube.com/user/CppCon https://www.aristeia.com/books.html
Pavel
No, captured variable can't be accessed from lambda object from outside of lambda, unless you provide it somehow from the call itself (e.g. as a return value, or by out-argument)
Pavel
As for local variables inside lambdas, they (as any other local variables) can't be accessed outside of their scope, but you can always capture a reference to a variable from outside the function and assign to it from inside, or again, return the value from the call or as out-argument, whatever suits best.
Anonymous
Hello I wanted to ask if it’s possible to post a c# problem that I have been battling with
Anonymous
private void btnadd_Click(object sender, EventArgs e) { for (int i = dataGridView1.RowCount - 1; i <= 0; i++) { DataGridViewRow row = dataGridView1.Rows[i]; if (Convert.ToBoolean(row.Cells["selectrow"].Value = true)) { Formq pan = new Formq(); pan.ShowDialog(); string may = Formq.mark1; productBindingSource4.AddNew(); dataGridView2.Rows[dataGridView2.Rows.Count - 1].Cells[1].Value = dataGridView1.Rows[i].Cells[1].Value.ToString(); dataGridView2.Rows[dataGridView2.Rows.Count - 1].Cells[2].Value = dataGridView1.Rows[i].Cells[2].Value.ToString(); dataGridView2.Rows[dataGridView2.Rows.Count - 1].Cells[3].Value = dataGridView1.Rows[i].Cells[3].Value.ToString(); dataGridView2.Rows[dataGridView2.Rows.Count - 1].Cells[4].Value = dataGridView1.Rows[i].Cells[4].Value.ToString(); dataGridView2.Rows[dataGridView2.Rows.Count-1].Cells["quantity"].Value = may; int qu = Int32.Parse(dataGridView2.Rows[dataGridView2.Rows.Count - 1].Cells["quantity"].Value.ToString()); string pp = dataGridView2.Rows[dataGridView2.Rows.Count - 1].Cells[3].Value.ToString(); Double rpp = Double.Parse(pp); Decimal rrpp = (decimal)rpp; Decimal tp = rrpp * qu; dataGridView2.Rows[dataGridView2.Rows.Count - 1].Cells["tprice"].Value = tp + ".00"; Double sum = 0; for (int f = 0; f < dataGridView2.Rows.Count; f++) { sum += double.Parse(dataGridView2.Rows[f].Cells[6].Value.ToString()); } string msun = (sum.ToString()); libt2.Text = msun; This is my code to create new guest table when a guest is seated and also add items according to what the guest buys
Anonymous
private void btn_Click(object sender, EventArgs e) { this.Hide(); salesitems op = new salesitems(); op.Show(); int i = 0; Button btn = sender as Button; string btntext = btn.Text; kk.getunpaid(int.Parse(btn.Text)); op.dataGridView2.DataSource = kk.getunpaid(int.Parse(btn.Text)); foreach (var dy in kk.getunpaid(int.Parse(btn.Text))) { op.dataGridView2.Rows[i].Cells["quantity"].Value = dy.quantity.ToString(); op.dataGridView2.Rows[i].Cells["Tprice"].Value = dy.tprice.ToString(); i++; op.libtabsno.Text = dy.tabel_sno_.ToString(); op.libuser.Text = dy.user.ToString(); op.libtno.Text = dy.tabel_no_.ToString(); op.libt2.Text = dy.total.ToString() And this to open unpaidchecks But when I try to add more items a new row is not added to the database but instead it updates the last row.
Anonymous
I wanted to upload a video but I can’t
Anonymous
no, write to C# group, it is in the rules...
I couldn’t find any c# group
Hadaward 'Solly'
did you try Csharp
aLessandro
Hi everyone, I'm newbie to C language. I'm trying to learn and implement a recursive binary search into my program, to search words into a dictionary. I have a struct struct dizionarioStruct { struct dizionarioStruct *sinistra, *destra; char parola[10], significato[20], sinonimo[20]; } *root = NULL; typedef struct dizionarioStruct dizionario; This is my function, which doesn't work, Im not sure if it is correct nor I call it correctly int binarycercaParola(dizionario * dictio, int l, int r, char parola[]) { if (r >= l) { int mid = l + (r - l) / 2; if (dictio[mid].parola == parola) return mid; if (dictio[mid].parola > parola) return binarycercaParola(arr, l, mid - 1, parola); return binarycercaParola(arr, mid + 1, r, parola); } return -1; } Could you please help me? That's how I call it int risultato = binarycercaParola(ptr->parola, ptr->sinistra, ptr->destra, w); Where w is the word I digit. Thanks in advance
Anonymous
did you try Csharp
Yea I have been stock with this for 3 weeks now
Hadaward 'Solly'
i dont get you
Anonymous
i dont get you
I meant yes I have tried most sites online
Anonymous
you better make a screenshot, code like this is unreadable
Unfortunately I can’t send a media file here
Hadaward 'Solly'
at least apply monospace to it
Anonymous
at least apply monospace to it
Ok I am doing that now
Hadaward 'Solly'
Hi everyone, I'm newbie to C language. I'm trying to learn and implement a recursive binary search into my program, to search words into a dictionary. I have a struct struct dizionarioStruct { struct dizionarioStruct *sinistra, *destra; char parola[10], significato[20], sinonimo[20]; } *root = NULL; typedef struct dizionarioStruct dizionario; This is my function, which doesn't work, Im not sure if it is correct nor I call it correctly int binarycercaParola(dizionario * dictio, int l, int r, char parola[]) { if (r >= l) { int mid = l + (r - l) / 2; if (dictio[mid].parola == parola) return mid; if (dictio[mid].parola > parola) return binarycercaParola(arr, l, mid - 1, parola); return binarycercaParola(arr, mid + 1, r, parola); } return -1; } Could you please help me? That's how I call it int risultato = binarycercaParola(ptr->parola, ptr->sinistra, ptr->destra, w); Where w is the word I digit. Thanks in advance
two main issues i found here (along other few things): First, you dont check for NULL nodes Second, you dont use strcmp to compare strings (char vectors) you are not moving through a tree. You made a function to move through a vector of nodes, using l and r as indexes like it were a heap (tree behaving list). That's what the sinistra i destra are for: to move through the tree recursively, considering it's a BST and that elements are inserted following alphabetic order; reason why you are trying to compare chars as ints. Third, your function doesnt return a node nor a string. It's a int and its name as variable isnt what it's supposed to mean Fourth, you are passing dizionario pointers parameters to int arguments
Hadaward 'Solly'
sec
Hadaward 'Solly'
int find(Key key, Node root){ while(root != null && root.key != key){ if(key < root.key) root = root.left; else(key > root.key) root = root.right; } if(root == null) return null; return root.data; } this is a more basic example which makes correct use of the pointers; adapt it so it compares the strings correct position, keeping track of latest error so in case you reach the last attempt of match you get to return -1. You'll prob only need 3 arguments, those being currentNode, currentindex for comparison (so you keep track of which char in the key and in the current node held word are to be compared) and finally the key (or searchedWord). Have fun and I hope I'll see you in compilers course later. https://media.geeksforgeeks.org/wp-content/uploads/BST.png
Hadaward 'Solly'
make sure to always check size. Avoid segmentation faults at all costs.
aLessandro
I will, thanks again
Hadaward 'Solly'
if you use iterations it wont be a recursive function anymore
AHMED
When reading from a file in c++, How to display the content in lines using the while loop and getline()?
AHMED
I created a file containing multiple lines using \n. But when reading from it, the compiler showed the content in one line not separate lines.
AHMED
#include<iostream> #include<fstream> using namespace std; int main (){ ofstream myObj("cases.txt"); myObj<<"Hello, this is my first file !\nI am displaying awesome content\nThis file will present our cases to you\nWe have 40 cases of sICH"; myObj.close(); return 0; }
AHMED
#include<iostream> #include<fstream> using namespace std; int main(){ string myText; ifstream myData("cases.txt"); while (getline(myData, myText)){ cout<<myText; } return 0; }
AHMED
I added that line to the while loop after Cout<<myText;
AHMED
Cout<<"\n";
AHMED
And the problem solved
AHMED
How to display in separate lines the string of multiple sentences entered by the user ?
Jasur Fozilov 🐳
...
Print the employee name and joined month in work Steven january
...
In sql
Anonymous
I really need some help with generally C++
aLessandro
if you use iterations it wont be a recursive function anymore
So where can I get dynamically the "currentIndex"?
Anonymous
/get cppbookguide
Anonymous
/saved
Anonymous
#vscodesetup101
Roxifλsz 🇱🇹
/ban epic referral link
Anonymous
I have an exam after half an hour, is there anyone who can help me?
Anonymous
very sorry
MᏫᎻᎯᎷᎷᎬᎠ
What's the last time the group had a useful discussion?
MᏫᎻᎯᎷᎷᎬᎠ
.
(^_^メ)
Alex
What's the last time the group had a useful discussion?
maybe later, now we are busy with our home assignments
MᏫᎻᎯᎷᎷᎬᎠ
maybe later, now we are busy with our home assignments
Wow y'all live in the same time zone?
Anonymous
#howtopostcode
🦁
Return Hello guys ;
Anonymous
Can anyone here help me i c program for my exam plz
MᏫᎻᎯᎷᎷᎬᎠ
https://twitter.com/mcypark/status/1352022455846506497?s=19
MᏫᎻᎯᎷᎷᎬᎠ
looks nice❤️
MᏫᎻᎯᎷᎷᎬᎠ
why do i see haskell
The next C++23 I hope so Pattern matching proposal
Wojak
Hi, I'm working on research work related to code optimization in C++ for eliminating redundancy due to static code. I was looking for someone to partner with me and publish a research paper in the same along with me (IEEE xplore for example). If someone is interested please ping me. I'll share you the synopsis and abstract for the same in DM
Ausir
Hi guys, I got a problem with my code. That's the matter: I create a monoarray in SHM, this array is thought as 2Darray, so idx of the array in SHM is equal to i*Column+j, i and j are the coordinates of the abstract 2Darray. Now every cells that are rounded by cells equal to 0 can be setted to 1. If someone can help me I'll send my code. Thanks a lot. I can explain my problem again 'cause my english is not perfect srr 🙏🏻
Anonymous
Who can help me I'll pay 🙏🙏🙏🙏 🔼🔼🔼🔼🔼🔼🔼🔼🔼 Plz help
Anonymous
pastebin.com/qVRNQdzm
Anonymous
pastebin.com/qVRNQdzm
Please I am experiencing a segmentation fault. Any help would be appreciated
Anonymous
# include <iostream> using namespace std; int main(){     cout<<"Enter the length of array"<<endl;     int n, counter, length, cd=0;     cin>>n;     int arr[n];     cout<<"Enter the elements of array"<<endl;     for(int i = 0; i<n ; i++){         cin>>arr[i];     }     for(int i=0; i<n; i++){         cd = arr[i+1]-arr[i];         for(int j =i; j<n; j++){             if (arr[j+1]-arr[j]==cd){                 counter++;             }             else{                 break;             }         }         if(counter>length){             length=counter;         }         counter =0;     }     cout<<length<<endl;     return 0; }
Have u got the solution to your problem? If yes, kindly share with me too.