Amu
Anonymous
Ok
Anonymous
So now it makes much more sense. I have a feeling you don't even read what Im typing.
Anonymous
So basically, the problem is probably that you are passing a pointer to a TaskQueue object
Amu
Anonymous
Because you are casting it to a Simulation object, which it's not.
Anonymous
I would suggest watching a tutorial for cpp from scratch
Anonymous
Np
Saleh
#include <stdio.h>
#include <string.h>
void main() {
char passwd[6], i ;
printf("pls enter your password");
scanf("%s",passwd);
printf("You have entered %s\n",passwd);
encrpt(passwd);
printf("Your password is encrpted: %s\n",passwd);
// encrpt function
for(i=0;passwd[i];i++){
passwd[i]=passwd[i]+3;
}
}
Saleh
hello i have been trying to write a function to encrpt a srting
Saleh
this is what i tried but its given me wrong
Anonymous
Where is the encrypt function?
Anonymous
encrpt *
Saleh
This
Anonymous
Show us the error
Anonymous
Also you don't close the function, but I guess u just copied it wrong
Anonymous
I mean, the text.
404
Ht
Anonymous
Oh and u don't return anything and don't pass anything haha.
I would suggest learning the language first
Anonymous
Don't ask questions if u don't know the language, it's pointless.
Saleh
OK thank you
Khaerul
Saleh
😂
Lol don't laugh at me, it's few days of learning and our teacher give us this task.
Saleh
To catch up with this please, can you suggest some areas to learn?
Anonymous
Thanks
Luca
hello guys, I've several c/cpp file compiled with a Makefile.
Each one of this file contain an int main function, I would like to create a new file to call several of this c/cpp file, so my question is:
How can I invoke the main of another c/cpp file from the current one? Should I create a new process right?
The problem is that I've tried to change the main method of Foo.c with just a simple function but i'm getting compile error when I use "make" again, I've tried to change Makefile but with no solution
Anonymous
Anonymous
Alessandro
You can if you change the makefile to compile them separately
Alessandro
If you compile them toghether you cant have more then one function with the same name unless you declare it as static
Anonymous
Hey hi
I am wondering for best DSA course and book 📚.
Can you tell me?
Thanks.
Anonymous
Anonymous
CLSR
Do you know best resources regarding DSA?
Anton
Hi, please advise how to convert uint8_t* to std::string properly. I was using std::string str=std::string((char*)uint8_t_data) but somehow it stopped working (I don't know exact reason - this method works locally in EXE, but stopped working remotely in DLL).
juabove
I requested for a course and the bot warned me.is it wrong to request?
klimi
klimi
Did you mean
klimi
#cs50
Krishnaa
#include<stdio.h>
int main()
{
int n;
scanf("%d",&n);
int price[n];
char item[n];
for(int i=0; i<n; i++){
scanf("%c,%d",&item[i],&price[i]);
}
return 0;
}
Krishnaa
Anonymous
Antonio
Can someone tell me what this means please: error: expected identifier or "(" before "(" token
Antonio
I’m just starting up I actually suck at this
artemetra 🇺🇦
Antonio
send your code first please
#include <stdio.h>
#include <string.h>
struct compito
{
char materia [20];
int ora;
};
typedef struct compito Compito;
void main();
{
Compito uno
strcpy (uno.materia "matematica");
uno.ora=1;
Compito due
strcpy (due.materia "italiano");
due.ora=2;
printf ("Compito di: %s, Ora: %d\n", uno.materia, uno.ora);
printf ("Compito di: %s, Ora: %d\n", due.materia, due.ora);
}
artemetra 🇺🇦
Antonio
12
Antonio
The { right after void main ()
artemetra 🇺🇦
it should be void main()
{ ...
artemetra 🇺🇦
also put a semicolon where you define uno and due
Antonio
artemetra 🇺🇦
also you forgot a comma in both strcpys
artemetra 🇺🇦
it should be strcpy (uno.materia, "matematica"); and the same for italiano
Antonio
Thanks mate it worked , I really appreciate that
artemetra 🇺🇦
np :')
juabove
I requested for social media marketing course. And the bot gave me warning
Dumb
juabove
Digital marketing
Krishnaa
Dumb
You used 3 variables while you were "scanning" only two
Krishnaa
Krishnaa
But still
Krishnaa
now have a look at it, that’s what I mean
Dumb
Dumb
scanf("%c %d",&item[i],&price[i]);
Dumb
it's the correct line
Krishnaa
Krishnaa
Like scanf(“(%d+%d)”, &a,&b);
Krishnaa
This works fine for an input: (2+5)
Dumb
mh you're right, my bad
Dumb
lemme think a moment about the code
i'm testing it
Dumb