19,876 Topics
![]() | |
Hi, I'm using fedora core and i'm trying to write a c++ program to read the ESSID of my current wireless connection. Is there a way to do so? KiaN | |
Does anyone know how to put a whitespace or a newline in a .txt file??? By this I mean, I have this long string, and I have to put whitespaces and new lines to make it understandable. To summarize, I just want to know what functions will be effective to … | |
Hi :) I am using TurboC++ IDE 3.0. I need to open a file and display the contents of this file on the screen. My problem is simple... i need to open a file and display its contents in graphics mode.. so that i can display it using outtextxy() ...is … | |
I am a student of electronics and i have to do a homework in C++. The problem is the following: how to write a code in order to find the most frequent value of two different one dimension arrays. the first array has for example 10 elements and the second … | |
i am a Btech pre-final year student ..i would like to get guidence from any of u for selecting a good mini project for tis year...hope that som of u vl help me... | |
Hey everyone, I am new to C++ and I was wondering if anyone could help me start off or by guiding me to which method of steps I should take first in solving the following problem: write a c++ program that with a loop structure that reads in 5 intergers … | |
WHere can i get free reference on commands and syntax for Borland C++ builder 6?? Specially commands for internet applications.. | |
Is there a way to see a list of the breakpoints (active or not) in C# Express? | |
Hi, I need some help here.. I am pretty new to doing ASP.net in C#.. and also pretty unfamiliar with javascript Currently i am facing some problems which i hope you guys can help me in solving.. I have dynamically created a row of buttons. [code] for (int i = … | |
I would like to ask about the strcpy or string how to use when the inputs:i like to play baseball then the output: i like to play baseball I hope there is recommendable code for that programs | |
We were supposed too make a program that would connect the given 2 points of a line. My program has a problem if the slope of the line is not 1. I'm just a noob in programing and still don't know how to clear the screen using system(); [code] #include<stdio.h> … | |
Can any one tell m what r th use of reentrant function and how to use it. | |
hope all r doing fine.. i need a quick and very quick reply m porting some cod:confused: e from windows to linux box..n i just encountered a function findfirstfile() used in windows..this function also takes wildcards as regular expression in the string I searched the net for an alternate implementation … | |
enter 5 digit number s and have them display in single digits,using division and the remainder mod. This is what i have so far but it doesnt seem to work. #include <stdio.h> int main() { int num1,num2,num3,num4,num5,number; printf("enter five digit number"); scanf("%d,%d,%d,%d,%d",&num1,&num2,&num3,&num4,&num5); num1r=(number-(number%10000))/10000; num2=(number%10000-(number%1000))/1000; num3=(number%1000-(number%100))/100; num4=(number%100-(number%10))/10; num5=(number%10-(number%1))/1; printf("first number is … | |
Hey guys, in c i am trying to read an input such as a command like [code] xeyes -bg red -fg blue [/code] i have managed to read it fine if there is no spaces so a single word such as "abc" but when i have spaces i get segmentation … | |
Hello! im new here and i have a problem regarding programming. We are required to compute for the distance of a certain city to another city...for example whats the distance of new york to los angeles..then the program will compute its distance... the output of the said program should be … | |
Post your tips for making life easier in C and C++. I'll start: [SIZE=3][B]Standard vector object initialization[/B][/SIZE] The biggest problem with the standard vector class is that one can't use an array initializer. This forces us to do something like this: [code] #include <iostream> #include <vector> using namespace std; int … | |
Hi, I wrote a function in 'C' as follows. [CODE]void myfunc(int x,int y) { asm mov ah , 0x02 asm mov bh , 0x0 asm mov dh , y <=Error Here asm mov dl , x <=Error Here } [/CODE] It shows the error "Invalid use of Opcode and Operand". … | |
Hi. Below are two pieces of code. This first one works fine: [code] char str[] = "Hello World"; char *b; b = &(str[3]); *b = '3'; printf("%s\n", str); [/code] However this second one results in a segmentation fault. [code] char *str = "Hello World"; char *b; b = &(str[3]); *b … | |
Hi friends, I have one question, if anybody can answer it. Question : (I am performing operations on tape drive using st driver) While performing read operation on tape (using read()), EOD occured. After EOD occured, i m firing MTIOCGET request and getting the tape status. After getting tape status, … | |
hi all, i have a problem with pthread programming. function_1(){ . . rc = pthread_create(&thread, &attr, my_function, (void *)&my_data); . rc = pthread_create(&thread, &attr, my_function, (void *)&my_data); . } As the above “`function_1`” do, the “`my_function`” can be executed any number of time according to our need, but the problem … | |
Dear Friends, I am developing a small project in which the users have to fill a form from which it will be saved into a database. Here i wanted to scan a particular folder in the hard-drive contineously so as to know if there is any new file saved in … | |
Hi, I want to make some kind of monitor for my PC and i want to have CPU load in form like "top" (something% , ex 23%). So i use C and : i'm opening the file /proc/stat and read the first line : cpu 92208 2282668 19432 79824 739 … | |
Hello,I am doing a project in which i need to send and receive data from a microcontroller.I was trying to do this in DEV CPP IDE 4.9.9.2 but couldn't succeed till now.The following is the code i tried compiling. The code: [code] #include <bios.h> #include <conio.h> #define COM1 0 #define … | |
Hi. I've written a small static (Unix .a) library, as usual made from a bunch of .c and .h files. A lot of the functions in the .h files are internal to the final library. Only a few of the .h files containing the public interface. How can I hide … | |
Hi, I am trying to create a method that accepts a pointer to a (static) string so that it can modify the string. I have something similar to this: [code] void modifyString(char **pstr) { char *str = *pstr; // Make changes to str ... } void doSomething() { char str[] … | |
Hi. Do you know how to get and set cursor position in C language? I know this can be done using GetCursorPos and SetCursorPos from Win32 Api but I want it to work on several OS so I cant use Win32 specific functions. Thanks. | |
if this topic is already up pleas point me to it coz i dont even know how to search it.... what i want to do is a small screen in the big screen and have all my printf(""); to print there... i dont know what else to say so pleas … | |
Hello folks, Does anyone know of any links that contain sample code for an FTP server implemented in C. | |
is there a way for me to write OOP programs in c++ for Texas Instruments TI 89 graphic calculator? | |
Hi everybody. First, sorry for my english, i am argentinian. I am trying to use a c library called openDBX that helps us talk to different RDBMS. Here is the link: [url]http://www.linuxnetworks.de/doc/index.php/OpenDBX[/url] I have already compiled and installed. Now, i am trying a simple c programe that uses it. The … | |
I need to write a code for reading values from the serial port and dumping them onto a text file, can someone help me? Whats required is that the changing values in the serial port has to to be updated frequently onto a text file. thanks for any help | |
Hi guys! I'm trying to rid my words of newline characters (and eventually punctuation as well). The words are in a two-dimensional array declared as words[MAXWORD][MAXLINE], where MAXWORD is currently 8000, and MAXLINE is currently 20. So up to 8000 words of 20 characters each. To do this, I am … | |
The following snippet finds the least, greatest and sum of the elements of an array. It works when I give the test condition with variable "i" in the for loop (as in the first snippet). But when I replace it with a pointer(as in second snippet), it gives a wrong … | |
[code=cpp]struct Product{ /* declare variables here to store product data */ char product_name[LEN]; int product_id; int quantity; double unit_price; int expire_month, expire_year; struct Product *next; }; pfile=fopen("binary.bin","wb"); if(pfile!=NULL) { while(head != NULL) { fwrite(&head, sizeof(struct Product), 1, pfile); //head=head->next; } fclose(pfile); puts("File Saved successfully!"); system("pause"); } else { puts("File not … | |
Hello, I am running a lightly random-based heuristic search with a problem, and I encounter something quite peculiar. When I run the program using no compiler optimization, I obtain results that are consistently worse than when I use compiler optimization (-O3 parameter using gcc). What I mean by "results" is … | |
please could any one give me hints in this question A popular method of displaying data is a Histogram. A histogram counts how many items of data fall in each of n equally sized intervals and displays the results as a bar chart in which each bar is proportional in … | |
Hi, again. I'm trying to read in data from a file that I've opened, so it is sitting in FILE* fp. Now I want to put it into a format that I can do things with it (seperate it into words). My question is: how can I do this dynamically? … | |
who can help me to derive this C++ codes to VB that can draw the triangle [CODE=c]#include<stdio.h> #include<conio.h> #include<stdlib.h> #include<math.h> main() { clrscr(); float a,b,c,S,D,A,B,C,Area,R; printf("Enter the lengths of the three sides of the triangle : "); scanf("%f%f%f",&a,&b,&c); S = (a+b+c)/2.0; // S is the semiperimeter of the triangle D … | |
Hey everyone, I'm attempting to write a program that will pipe and fork to have a parent and child process. Then the parent writes numbers to the pipe and the child either multiplies or divides the two numbers. For some reason my file I/O isn't working. It's supposed to keep … | |
In PHP I can use the pack function to format a integer value to a 16 bit wav channel chunk. It gets the endianness right and it works. How would one go about creating raw wav data in c? [code] function cram ($integer, $type = 's', $length = '*') { … | |
i have no idea whats wrong with this function =\ [code] void throw_cards(card h_cards[]) { char f; cleardevice(); while(f!='f') { printf("from 0 to 6 pick the cards you want to thorw\n"); printf("to finish hit 'f'"); f=getch(); printf("trowing card %c",f); } } [/code] i get the error: Type mismatch in redecleration … | |
Hi folks. I'm trying to do something I hope is very simple -- taking an argument placed after the program's name and storing it. So, if I type whatnumber 4 it will store the value 4, whatnumber 100 will store 100, etc. I've tried using int argc, char *argv[] instead … | |
I have this problem with my ( .rc) file i do not know why [code] #include "digitron_h.h" MENU_ID MENU BEGIN POPUP "&File" { MENUITEM "E&xit", EXIT_ID } POPUP "&Help" { MENUITEM "H&elp About", HELP_ID } END ID_DIALOGEX DIALOG 0, 0, 98, 52 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION CAPTION "calc" … | |
I am currently going to school for a CS degree and I was wondering what people would recommend doing to keep my programming skills up to date. I can only take about 2 classes a term and some of programming classes are really spread out making it hard to remember … | |
i just want to know how to write a circular linked list destructor. anybody help? | |
Can someone explain the nesting in C#? You have a namespace. Inside the namespace, you have a class. Then, inside this class, you have the main function. Why is it set up this way. Are all classes supposed to be ouside this namespace? When would you onclude a class inside … | |
I have been able to create a C# program from scratch. When I do so, I automatically get a list of References like this: [IMG]http://i67.photobucket.com/albums/h292/Athono/csharp.png[/IMG] When I open a project developed by a co-worker, I get a list of References that looks like this: [IMG]http://i67.photobucket.com/albums/h292/Athono/01-1-1.png[/IMG] This is very different and … | |
is it possible to run a source file that is not part of a solution/project? it appears that this is not possible in Sharpdevelop. Also, why is it I cannot compile and run a file that is not part of a solution ? many thanks | |
I am writing a C program to search for some keyword in a text file The following is the product, but how can I change the char *string[] = { "apple", "orange", "banana", }; to become input from file? (That means there will be one file storing keyword and the … |
The End.