19,876 Topics
![]() | |
Can some body know a function that removes white spaces in begining and end and also removes '\n' or '\0' from a file in C language | |
Hi All, I am trying to call third party dll from C program. This third party dll is written in C. I am using microsoft visual studio 2005. Could anyone please give me steps to add dll tot he project and to call from C program? I am new to … | |
Hello, i'm a newbie to Linus so there are many commands that keep me questioning. My task is to write a program that will execute a list of commands from a text file. Everything go smooth except for the command execve, its prototype is something like [iCODE]int execve ( char … | |
Hi, I'm a student in Computer Science and we have a machine project due on August 20. The problem is, the professor only taught us the basics of C programming, the functions, switch statements and whatnot, and now they're giving us a project about making a game. The game is … | |
[code] BOOL SaveTextFileFromEdit(HWND hEdit, LPCTSTR pszFileName) { HANDLE hFile; BOOL bSuccess = FALSE; hFile = CreateFile(pszFileName, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if(hFile != INVALID_HANDLE_VALUE) { DWORD dwTextLength; dwTextLength = GetWindowTextLength(hEdit); // No need to bother if there's no text. if(dwTextLength > 0) { LPSTR pszText; DWORD dwBufferSize = dwTextLength … | |
I need to delete a shortcut but the code I wrote will not work. [code=C#]System.IO.File.Delete("C:/WINDOWS/Example.Ink"); // This returns no errors at all, just nothing happens.[/code] Does anyone have an idea on an alternate way to delete a shortcut? Any help is appreciated =D | |
Hay, I looking for open source code in c language which schedule/deschdule a functions that will run in a new threads, so for example I can schedule the function to run every 30 minutes in new tread. I want to use this source in my program as an infrastructure service. … | |
Hello, and thanks in advance :) I'm currently working on solving an ODE, which I already know what it the solution supposed to "look like" . I wanted to try with GSL ODE solvers, but I'm having some trouble, because I'm getting something completely wrong! I just wanted to see … | |
My IsPerfect function aint working and I dont no where i went wrong. [CODE]bool IsPerfect(int num) { int sum = 0; int x; int divisor; x = num; while(x > 0) { divisor = x; if(num % divisor == 0) { sum += divisor; } x--; } if(sum == num) … | |
1. Write a C program to read a list of books from a file and create a linked list to store them. The purpose of this program is to keep track of the books kept in a shelf. The shelf is a three-tier shelf and each tier can store up … | |
I saw this small code of a program to print HI without a semicolon in the program. I don understand how it works. [code] int main() { while(printf("HI")-2) {} } [/code] Any help would be appreciated. | |
I am currently working on a real time operating system(freertos) task, there are 3 tasks here and the problem im having is with the 1st task. it is basically to have 2 modes, toggled by a single button "RIGHT" (keys = ~PTH & BOTH). this has got to go basically … | |
Hi, My name is Oleg and I'm 1,5-year experienced C# developer working in Danish outsourcing IT company. I'm searching for freelance work here. If interested with my CV, please write to me, Best regards. | |
hi everyone, I've seen that in C we can call functions from DLL's, but i don't know how, can you please clear my ignorance or divers me to a website where i can learn it. Thanks | |
Hi, I'm making a little program that will send email. I am fine with the sockets, but I keep getting a segmentation fault and I don't know why:$. I'm trying to make a loop that will let the user enter the data for the email, ending with a '.' on … | |
Hello, this is Metalcrunch. I've been learning C++ over the past days and I thought I'd make a calculator. So I looked over the existing code on the internet on how to make a calculator, understood it, then made my own from the very scratch. However, I'm having a few … | |
I'm coming from the PHP world, and it's nice to see the similarities between C & PHP. But I have so many questions! :) This is a simple fopen() script, easily found online. What I am wondering about is the buffer variable. I think I understand that it's only looking … | |
Hi all, I'm just a newbie and I need your help, I should write a code about NRU and frankly speaking, I don't know what to do:$ . do you have some related codes, so I can undrestand where to begin and how to do it? any suggestions would be … | |
hi! can someone give me some idea what kind of game is easy to do in c++? or kind of a system.. it is for our project..I'm thinking of doing text twist..can someone give some other idea? thanks very much!!! ![]() | |
Make A C Program That Performs The Following Algorithm: (a)Use Scan F To Input The Following Data: -assign Value 26 To Age. -assign Value 80 To Weight In Kg. -assign The Value 183.219 To Height Cm. (b)Calculate The Weight-to-height Ratio. (c)Display A Heading For The Results (d)Display The Results In … | |
This program requires the user to input data, after which it calculates. After calculating all the users it puts it prints it onto a document and screen. After which it gets sorted by name, the data gets outputted to another screen displaying a fake check that includes that is grabbed … | |
Im trying to write a program to print all the primes from 1 to 100. I am however required to use a boolean function. My problem is that all the odd #s except 1 also appear in the output. [code] #include "stdafx.h" #include <stdio.h> #include "strlib.h" #include "genlib.h" #include "random.h" … | |
I've noticed a few different ways people write the main() function. int main{ } main(void){ } void main(){ } I'm confused with what's considered "best practice" or why I'd choose one over the other. Is there a difference? thanks! | |
Thanks for at least reading. My assignment is to prompt for a filename, change the contents to caps, and print. I have the following, and it's giving me the error at line 25 (the inside loop) Assignment makes integer from pointer without a cast What does that mean, and how … ![]() | |
This is my first C program. I am modifying an existing program to have input and when I added two lines of code to 1) print "Enter Purchase Amount" and 2) scanf to capture the data my other printf statement received a compile error that it has the wrong # … | |
Hi. I'm new to c# and have ran into a problem, I am using the following code to generate textboxes within a panel. [code] private void button1_Click(object sender, EventArgs e) { AddFields(); } private void AddFields() { if (textBoxIndex != 10) { TextBox field = new TextBox(); field.Name = "field" … | |
//This program will ask the user for k, m and n. //k should not be equal to 1. //Output all numbers multiple by k between m and n. (ex. k=2,m=5,n=20 output should be 6 8 10...18) *problem* How to exit this program when the user assigned k to 1 ? … | |
Hi I'm running this on a mac and when i use '\n' it prints the entire contents of the pointed to text file. looking for '\r' just cause an infinite loop. Any idea what the problem might be? [code] #include <stdio.h> #include <stdlib.h> int main(void){ FILE * input; char * … | |
hai dani, how to create a vertical histogram in c using graphics header file. | |
Hey all, I am trying to check if a .exe file is open, if it is open bring it to foreground, if it is not open open .exe file and bring to foreground. The code I have written doesnt seem to recognise if the program is open or not as … | |
Ei guys... I'm about to make a project involving the use of a LAN cable/port and c++ I would like to use c++ to to send bit (Binary Output) outputs through a LAN cable. just like what we do with c++ and parallel ports, but this time I'll be using … | |
hey guys i know its kinda noobish not to understand them since i been coding for 1 month but there rlly some stuff which confuses me in multidimensional array and nested loops like here in this program I wanted to know if i sum up like in the array for … | |
Here is a code: [CODE] #include<stdio.h> #include<string.h> int main(void) { char *s1="hello"; char *s2="world"; char *s3; s3=strcat(s1,s2); printf("%s",s3); } [/CODE] What does strcat returns? Why does this code results in run time error? And one more question : Are "hello" and "world" terminated with '\0' in case of char pointers? … | |
Hi, Does anyone no if it is possible to remove controls like a textbox during runtime? | |
Help I need a quicker way to do this, its a combobox that assigns a number to whatevers selected and it takes up to much room and looks messy. [code] private void comboBox19_SelectedIndexChanged(object sender, EventArgs e) { if (comboBox19.Items[comboBox19.SelectedIndex].ToString() == "Clear Float") { glassType10 = 200; } else if (comboBox19.Items[comboBox19.SelectedIndex].ToString() … | |
Hi All, I'm working on a GUI project that involves continuously reading data (which is a waveform - like a simple sinusoid) from a file (which gets periodically updated), and displaying it as a pixel-based image. I was able to follow some tutorials online and install Allegro and successfully plot … | |
Hi, Does anybody know how I can create a bunch of textboxes and buttons without having to write each one individually e.g [code] Button button1 = new Button; button1.Location = new Point(1,20); this.Controls.Add(button1); [/code] And then having to go onto the next one e.g button2. Please help | |
Hi, I am creating a program on behalf of my business and have become stuck in one particular matter. I am fairly new to C#. The application consists of the user entering data into a mixture of comboBoxes and textboxes, after the user has entered the data he clicks the … | |
Hi, I am creating a program on behalf of my company and am stuck in one particular matter. I am fairly new to C#. At the moment I am creating a textbox, label and a button at the push of a diffrent button with the following code. [code] TextBox textBox6 … | |
[B]Hello to All i want to read txt file that contant some data's such as :[/B] [CODE]1,2,3,4,5,6 7,8,9,10,11,12 13,14,15,16,17,18,19[/CODE] [B]and then write them into a two dimentional Array .[/B] for example : first line of file must be first row of array or another example the first data in first … | |
hello.can you please help me guys on these.. A company wants to transmit data over the telephone, buit is concerned that its phone could be trapped. All of the data are transmitted as four-digit integers.The company has asked you to write a program that encrypts the data so that it … | |
While we allocate memory using malloc/calloc.That much bytes is reserved by the program.When the program terminates and we didnot free it what happens exactly? How to check memory usage by a program by writeing a C program. | |
i want to select java or c# please help me to select better programming language and easy to programming language i have experience in c++ if java is better please tell me why java is better or c# please introduce me best books for java and c# | |
How can I obtain font properties thru a font file (*.otf;*.ttf or PostScript fonts)? | |
Hi! I'm just starting to code in C, and I'm trying to read the information in a dat file, to then use it in some calculations. I read the information in the file and then save it in an array. However when I try later to access that array I … | |
hello, i want to know how I can book online flight reservation ? | |
Hi, I am creating a program for my business that allows us to write quotes quickly, I am fairly new to C# and am stuck on a particular matter. i cannot relate to my Dynamically created textbox no matter what i name it, i am using the following code to … | |
Dear all, I have a weird problem reading a file using fgets. The code below should read the first line of the file "F:\\filename.csv". It works for all sorts of files that I create myself, but it does NOT work for certain files that I download from the internet. More … |
The End.