AHMED
Yes blue tea
I typed cout and it worked.
Thank you.
🅆🄰🄶 𝑥 🄴🄻 🅀🅄🄰🄳🅁🄰
klimi
klimi
klimi
i don't know what are your sources
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
Andrew
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
klimi
Anonymous
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
Hadaward 'Solly'
i dont get you
Andrew
Anonymous
Hadaward 'Solly'
at least apply monospace to it
Anonymous
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
aLessandro
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
aLessandro
Hadaward 'Solly'
make sure to always check size. Avoid segmentation faults at all costs.
aLessandro
I will, thanks again
aLessandro
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.
olli
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++
klimi
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?
klimi
MᏫᎻᎯᎷᎷᎬᎠ
Alex
MᏫᎻᎯᎷᎷᎬᎠ
Anonymous
#howtopostcode
🦁
Return Hello guys ;
Anonymous
Can anyone here help me i c program for my exam plz
z
Anonymous
MᏫᎻᎯᎷᎷᎬᎠ
https://twitter.com/mcypark/status/1352022455846506497?s=19
MᏫᎻᎯᎷᎷᎬᎠ
looks nice❤️
klimi
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
Anonymous
pastebin.com/qVRNQdzm
Anonymous
pastebin.com/qVRNQdzm
Please I am experiencing a segmentation fault.
Any help would be appreciated
Anonymous