Posts by GratefullyDead • 373 points
14 posts
-
0
votes2
answers758
viewsQ: Doubt in c (chained and vector lists)
How can I create an array where each position is a pointer to a chained list ? For example: typedef struct info Info struct info { int num; Info* prox; }; And then I want to create a vector, and do…
casked GratefullyDead 373 -
3
votes1
answer169
viewsQ: Return function of the next ASCII character in C
Do a function: strShift() that receives a string with alphabet letters and returns a new string with letters replaced by their successors in the ASCII table. For example, "Ana" returns "Bob" and…
-
1
votes2
answers79
viewsQ: Error in C program compatibility between float and float pointer
I need to pass a float vector for a function that dynamically allocates memory and then returns this inverted vector. However, my code tells me that I have an error here: program. c: In Function…
casked GratefullyDead 373 -
2
votes1
answer40
viewsQ: Doubt about accounting for ' n' in C
I have to count the number of characters and line breaks in my file.I did it this way: The idea is to count the line break every time someone gives enter, but I can only use the getc. include…
casked GratefullyDead 373 -
8
votes1
answer39629
viewsQ: Vscode keyboard shortcuts for comments
In Vscode I am not able to run some shortcuts. The comments shortcut, for example, does not work. The shortcut would be Ctrl+/, but all shortcuts that need a key that has more than one letter or…
visual-studio-codeasked GratefullyDead 373 -
-3
votes1
answer76
viewsQ: Aid in web development
Hello, everybody! I am learning how to develop websites and would like a help, on the website of the editor I use, Tom, has an "animation" that I found fantastic. Follow the website link:…
-
0
votes4
answers725
viewsQ: Function that returns the element with more characters from a list
I arrived at the following function: def func6a(lista): maior = 0 for el in lista: if type(el) == list: maior = func6a(el) else: if len(el) > maior: maior = el return maior But unfortunately,:…
pythonasked GratefullyDead 373 -
1
votes2
answers2726
viewsQ: Recursive function to return string backwards
I need a recursive function that returns the string it takes as the inverted form parameter,arrived in this role: def stringinvert(palavra): if palavra < 10: print(palavra) return…
pythonasked GratefullyDead 373 -
5
votes3
answers1627
viewsQ: Nested lists in python
I need some help, let’s say I have the following list: lista = [1,2,3,4,5,[6,7,8,9],10,11,12,13,14,15] If I wanted to print each of the items on that list I would make one: for i in lista:…
-
0
votes1
answer158
viewsQ: Android Studio running problem
Friends, I need your help to solve a problem. When I open Android Studio appears the following error and I can’t do anything about it. Could someone help me ? >Failed to…
android-studioasked GratefullyDead 373 -
-4
votes2
answers947
viewsQ: How to turn all items in a string list into integers?
I have a list containing "n" elements like str. However, I need to make these elements come whole. How can I do this ? For example, I have this list here: trechos = conteudo[2:len(conteudo)] Turns…
pythonasked GratefullyDead 373 -
1
votes0
answers95
viewsQ: How to read comma-separated numbers in a text file?
Hey, guys, hey, hey, hey, guys!. Next,I have an archive where I have several comma separated values.I need to turn these values in a list,and even then it’s quiet. The point is that using the python…
pythonasked GratefullyDead 373 -
1
votes1
answer715
viewsQ: Help in Python! Guessing game!
I need some help in this little game. The point is this, the game I’ve made and it’s working perfectly, what I need actually is the loop with the While. I can not find the error, while the user does…
pythonasked GratefullyDead 373 -
2
votes1
answer129
viewsQ: Function adding values within the list
I have a problem and I need to create a function that adds the values that are inside a list. I have already done this and the code is below, however, Python returns me the value 3 as a result, when…
pythonasked GratefullyDead 373