I am trying to replace a string in a function with double pointers. I would like to see this change back in main. What am I doing wrong? These are the warnings my compiler gave me. $ gcc *.c -Wall main.c: In function ‘replacevalue’: main.c:10:12: warning: passing argument 1 of ‘strcpy’ makes pointer from integer without a cast [-Wint-conversion] strcpy(**pinput1, string); ^ In file included from main.c:4:0: /usr/include/string.h:38:8: note: expected ‘char * restrict’ but argument is of type ‘char’ char *strcpy (char *__restrict, const char *__restrict); ^~~~~~ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> void replacevalue(char **pinput1) { char …

Member Avatar
Member Avatar
+0 forum 1

I am doing a team project with some people that prefer Linux and some people prefer Windows. We are also not allowed to share code for security reasons. One thing the Windows people love to whine about is a way to hold the window open. So the way they usually solve the problem is with: #include <conio.h> getch(); This creates a problem for the Linux users since we do not have that library. I have been looking for ways to solve this problem and I really like this idea. https://www.dreamincode.net/forums/topic/30581-holding-the-execution-window-open/page__st__30__p__575874&#entry575874 #include <stdlib.h> //For system commands //Detect and define which command …

Member Avatar
Member Avatar
+0 forum 2

I am on the latest version of Windows 10, running with SWI-Prolog 7.6.4, and trying to get JPL (Java <->Prolog) running for a school project. I've not had to deal with path issues much but I have done my best to understand the problem. I've added the necessary import statements to my java class file, and the necessary environment variables to my system as per the page here: https://jpl7.org/DeploymentWindows However it *still* does not show up as a valid java package. I've just realized as I write this that maybe I need to reboot. I will try that after posting …

Member Avatar
Member Avatar
+1 forum 3

So I'm trying to create a UI that allows multiple buttons in the same window. All of the are toggles to control GPIO outputs to control relays. I've managed to get them to all work individually in their own files, but when put into the same file is all on or all off. There is only 4 toggles for now, as a demonstration for my boss, but there will be many more on the final product.` Below is the code I've come up with so far. (keep in mind I only started learning Python and coding in general yesterday) I'm …

Member Avatar
Member Avatar
+1 forum 4

I am traying to filter Datagrid view based on user type in TbxGlCode (TextBox) Initialy Datatable is populated from SQL table to TempTable (DataTable) getting error at **runtime** at below line Dim Rows As DataRow() = TempTable.[Select]("Code like '%" & VerCode & "%'") Exception Unhandled **System.Data.EvaluateException: 'Cannot perform 'Like' operation on System.Int32 and System.String** How to filter datatable with** Like ** option *My Code* Dim TempTable As DataTable Private Sub FrmGLCodeList_Load(sender As Object, e As EventArgs) Handles MyBase.Load ' Dim TempTable As DataTable 'Create New Table Instance TempTable = New DataTable TempTable.Columns.Add("Code", GetType(Integer)) TempTable.Columns.Add("Name", GetType(String)) 'Adding Rows to TempTable from …

Member Avatar
Member Avatar
+0 forum 5

hi I have datagridview which i want to add on several forms. Number of columons and all ather functionality remains the same. to avoid creating size, columns, column names each time, i am trying to create class control for datagridview which will give me by default number of columns and size once i add the datagrid to form. i have tried this . **But it shows ten columns instead of five** . attached picture Public Class ClsDgvJournal Inherits DataGridView Public Sub New() Width = 500 Height = 200 Dim Col1 = New DataGridViewTextBoxColumn With {.HeaderText = "AAA", .Name = "A", …

Member Avatar
Member Avatar
+0 forum 10

Pretty neat text-based RPG that I made. Currently my first game.

Member Avatar
Member Avatar
+0 forum 18

Is it possible to store a certain function as a variable? If not, is it okay to make a class, and define a function. Store the class as the variable and invoke that function?

Member Avatar
Member Avatar
+1 forum 7

I'm using Gambas as my language.. :-) Now I have a problem getting some values from an XML document. I'm using xml.gb as my "plugin". The XML document is: "<ns1:Event> <ns1:Number>1</ns1:Number> <ns1:Name>Home Team - Away Team</ns1:Name> <ns1:Status Id="100">End</ns1:Status> <ns1:Results> <ns1:Result Id="0" Name="Result">2</ns1:Result> <ns1:Result Id="1" Name="Fulltime">2</ns1:Result> <ns1:Result Id="2" Name="Halftime">0</ns1:Result> </ns1:Results> </ns1:Event>" My code so far is: Dim i As Integer Dim iKampnr As Integer Dim iRes As New Integer[] Dim hXMLDocument As XmlDocument Dim xeElements As XmlElement[] Dim tempElements As XmlElement[] Dim xeNode As XmlNode[] Dim xsRecord As String[] Dim sSplit As New String[] Dim yData As New XMLNT Dim rData …

Member Avatar
Member Avatar
+0 forum 6

I need to create a class that represents one crayon of a particular color and height(length). Then, I need to design an applet that lets me draw a box of different colored crayons. This is what I have so far: **CLASS:** import java.awt.*; public class Crayon { private final int BOTTOM = 150; private final int WIDTH = 25; private Color color; private int length, location; //---------------------------------------------------------------------------------------------- // Crayon's characteristics. //---------------------------------------------------------------------------------------------- public Crayon (Color color, int length, int position) { color = color; length = length; location = position; } //---------------------------------------------------------------------------------------------- // Draws crayon. //---------------------------------------------------------------------------------------------- public void draw (Graphics page) …

Member Avatar
Member Avatar
+0 forum 5

hi, i am trying to read from a text file and store the data in an array but i don't know how to get started with my code. can someone please get me started here. i have start with the code for locating the file, but i am having difficulty reading the file. Dim strFileName As String OpenAnswerFile.ShowDialog() strFileName = OpenAnswerFile.FileName MessageBox.Show(strFileName) 'message box showing the file path

Member Avatar
Member Avatar
+0 forum 13

Hello! I am interested in the issue of protecting the code from hacking. Do you protect your code from decompiling and hacking? Why did the question arise? I worked in a team that developed games for Android. They all used obfuscators! So almost no one could hack their application. Now I am interested in the topic of code protection. I looked at the existing topics, they are slightly outdated (8-10 years ago were relevant). Use / not use obfuscator? Which to choose?

Member Avatar
Member Avatar
+1 forum 14

i'm trying to make price lable printer and i was able to print a single page for a single id, but my problem is when i'm trying to print more that one id i was not able to make it work, i'm still learning but i was hoping that someone can give me idea how to make it work Imports MySql.Data.MySqlClient Public Module thisModule 'Info for the Price Lable Public NameV As String Public IdV As String Public DiscV As String Public ArDiscV As String Public PriceV As String Public SalesPriceV As String End Module Public Class Form1 Dim connection …

Member Avatar
Member Avatar
+1 forum 3

Is there any method in java to generate random number (integer, byte or float) ? Please tell me if any i need it in my program. If possible please give full example. Thanks!

Member Avatar
Member Avatar
+0 forum 1

Above program takes input of coefficient and power separately of 2 different polynomials add them up to a new polynomial.It is successfully compiled and executed in DEV CPP as C file.It Turbo C compiler add void before main function to avoid warning messages.

Member Avatar
Member Avatar
-1 forum 7

Im Stuck With Something, Iv Been Searching, And Searching And I Canot Find Any Information On How To Make SQL Database Show The Samething For Everyone, When Updated Of Coarse... I Can Make The DataTable And Put It On A Form But I Cannot Make It To Where I Add Something And It Update For People That Have Different computers... Please Help!!!!

Member Avatar
Member Avatar
+1 forum 3

So I have a poker type program where it should shuffle and deal a deck of cards using arrays of pointers. I have to write a function that uses a pointer(s) to determine if the hand contains an Ace. If I can understand this one, I'd be able to do the rest with no problems. I was told to do what I did with int decks, int dealt, int the_hand, but I keep getting errors. I've been trying everything I could think of, but no luck. Am I even in the right direction? Also, I read the book, reviewed my …

Member Avatar
Member Avatar
+0 forum 12

Hello everyone : ) i'm working on : [quote]Write a program that takes an input sentence from the user and on next line display the number of capitals letters in the sentence. Note: · User is not allowed to enter a sentence with more than 9 Capital letters. [/quote] what i did is : [code] .MODEL SMALL .STACK 100H .DATA MSG1 DB 'PLEASE ENTER YOUR SENTENCE: $' MSG2 DB 0DH,0AH,'THE NUMBER OF CAPITAL LETTERS IN SENTENCE :$' MSG3 DB 0DH,0AH,'You have entered more than 9 capital liter $' .CODE MAIN PROC MOV AX,@DATA ;initialize DS MOV DS,AX ;DISPLAY MSG1 LEA …

Member Avatar
Member Avatar
+0 forum 14

This code shows how to obtain and display a GIF image from an internet website using the Tkinter GUI toolkit that comes with the Python installation.

Member Avatar
Member Avatar
+4 forum 7

Hi I have python code that can list all drive letters but now I need also list the name of drive letter (Label) and the size of hard drive like below! Ltr Label Size ---- ------ --------- C Windows 800 GB E Local Disk 200 GB F My Passport 500 GB Y Secret 1 GB import string from ctypes import windll def get_drives(): drives = [] bitmask = windll.kernel32.GetLogicalDrives() for letter in string.ascii_uppercase: if bitmask & 1: drives.append(letter) bitmask >>= 1 return drives if __name__ == '__main__': print (get_drives()) # On my PC, this prints ['A', 'C', 'D', 'F', 'H'] …

Member Avatar
Member Avatar
+1 forum 8

In my access database, I have a table for the master list of items discussed in a training meeting. If a certain item was discussed in a meeting, then the value in the database is 1, if it was not discussed, then the item is 0. I'm trying to get these values into checkboxes on my form, checked if the value is 1 and unchecked if 0. However when I run it, I get a "NullReferenceException was unhandled. Object reference not set to an instance of an object" The code for that subroutine is: Private Sub NavigateTrainingItems() chkDrugAlcoholPolicy.Checked = False …

Member Avatar
Member Avatar
+0 forum 7

Hi guys, i'm having a difficulty to set the path in vb.net.i put the code in the module and every time i run the code it throws error "Could not find file 'C:\Users\Abdueie\Desktop\BMS\Bridge Asset Management\Bridge Asset Management\bin\Debug\Adigrat.accdb'." here's the code Public conn As OleDbConnection = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0; Data Source= .\\Adigrat.accdb;Persist Security Info=False")

Member Avatar
Member Avatar
+1 forum 8

Hi! We are a 4 member group for our thesis and we already have submitted 5 topic proposals yet nothing was accepted...and here are the topics: enrollment system, gadgets on track, employment resource system, subdivision technical entry pass Now, I need a help for new ideas that can be developed through visual studio and it can be a web-based or window-based projects. Hope you can help me Thanks in advance!

Member Avatar
Member Avatar
+0 forum 36

I've been studying TDD for a few years and read quite a few books but none that good to be honest. Can anyone recomend any good ones. I'm not interested in BDD but am keen on anything that tackles the many problems of mocking intrinsic MVC objects.

Member Avatar
Member Avatar
+1 forum 1

I am using PySide2 for GUI. I have a "Rename Project" QAction. The function must be like this: 1. set enable to false if tab name is "*Untitled" or file is unsaved. 2. set enable to True if file is loaded. How to do this? 3. Whenever switching to tab, these functions should be observed.

Member Avatar
Member Avatar
+1 forum 5

I have 30 functions like this void func1(int *var1, int *var2) { func2(var1, var2); } void func2(int *var1, int *var2) { func3(var1, var2); } void func3(int *var1, int *var2) { func4(var1, var2); } I do not need var3 until func15. Is there a way to fix this mistake without having to change all the function calls and headings? var3 needs to be remembered every time I get to func15. I only use var3 in func15 though so I really do not want to have to change all of my function calls and headings. It obviously can't be a local variable …

Member Avatar
Member Avatar
+0 forum 4

How can I make this to continue until the user presses N? I've tried using while(1), while( option == 'y' || option == 'Y') but it kept giving an error for that, and if/else statements but no luck. So I decided to try a do while statement and same results, it seems it is working, but I don't know what I'm doing wrong. I even tried moving all the statements to different areas and still nothing. #include <stdio.h> #include <time.h> #include <stdlib.h> enum meme {YEE, KNUCKLES, DOGE, HARAMBE, BUTKUS}; int dankestmemes(void); // function prototype int main(void) { srand(time(NULL)); // randomize …

Member Avatar
Member Avatar
+0 forum 10

I need a form that accepts two operands and an operator from the user and then performs the requested operation. Specifications Before performing the calculation, the application should check that both operands are numeric and that the operator is one of the following: + add - subtract * multiply / divide It should also check that both operands are between 0 and 1,000,000 (non-inclusive). To perform this data validation, code IsPresent, IsDecimal, and IsValidData methods as described in chapter 7 of the book. In addition, code an IsOperator method that checks for a valid operator. Code a private method named …

Member Avatar
Member Avatar
+0 forum 10

I have a program that is meant to display the total, average, student name and letter grade for a student. I'm almost done writing it but I have no idea how to make it loop so it goes back to step 1 from step 4. Everything I've read on using "while" loops hasn't really been helpful to me with this particular application. import java.util.Scanner; public class Averages5 { public static void main(String[] args) { // variable declaration String name; int mark1, mark2, mark3 ; int grade = 0; int A, B, C, F; double average; // input Scanner input = …

Member Avatar
Member Avatar
+0 forum 2

This may sound wierd, or easy, I just don't have a statistics background. How do I alter the statistical value of an array of emmitted random numbers? I am completely capable of using ranges, or creating an algorithim, I just need pseudo code or a brief description to guide me through the process. This is not homework. This would mean I essentially generate randoms, and the final result has a statistical probability. Thanks!

Member Avatar
Member Avatar
+0 forum 3

The End.