19,876 Topics
![]() | |
I need to convert a DWORD into 4 bytes to send to serial RAM. All the examples of using SPIRAM, EEPROM and FLASH use `*variable` to send and receive. I can break the DWORD down into bytes which I stuck in a `char[3]`. I don't, apparently even with all my … | |
I have a problem. It is to generate a C code Please tell me how to display a image file on the screen in C? If u r kind to me, send the code | |
How to find this series without using power function in c 1+x/1!+x2/2!+x3/3!+x4/4! please help me out i'm unable to solve these type of questions | |
Hello, I am fairly new to c and i am finding it hard to spot why a part of a program I am making is not working. The program lets you work out the area and circumference of a circle. This is the code: #include <stdio.h> #include <math.h> int area() … | |
Hi, I hope someone can help me with a problem that I am currently stuck on, basically I am trying to create a file archive utility which can archive 1 or more file each specified in a command line into a file. My problem which I am currently stuck on … | |
Dear all, I m a newbie in C. When do the questions in "C Programming for Absolute Beginners" (MICHAEL VINE, 2008) When talked about structure programming, there is a question. Write A function that prints an ATM menu—it receives no parameters and returns no value. Void displaymenu() /********************* Function Prototypes … | |
When I use void main in the code it compiles successfully but gives an runtime error on gcc compiler..But when void is replaced by int then it doesnot show any errors.What is the reason behind this behaviour? | |
Hi, In openssl, X509_STORE_add_cert() would add a certificate to the list of trusted certificates in the ctx. What is the way to remove a certificate from this trusted store? Am not finding any function to remove the certificate. Can anyone of you suggest a way to remove the certificate from … | |
Dear all, I am a newbie in C. Just come across function prototype. I have a task in write a function prototype for: * A function that finds the larger of two numbers and returns the result and i write the following. #include <stdio.h> /* Function Definition, I do not … | |
i have an array of strings (2D array). i am taking input of strings and that strings can be same with strings which i have inputted before that string. so i want that i don't enter that string which is already being taken into array. so how can i do … | |
I'm reading through a C# coding standards document and come across a section that reads as follows: * Try to prefix Boolean variables and properties with "Can", "Is" and "Has". Can anyone give me an example of hows it's done or maybe a useful link on the subject please ? … | |
hello i have some a problem with malloc, here is my code: int add(int m,int n) { int **pina, **pinb, **pinc; int c=m*n, i=0, j=0; pina=NULL; pinb=NULL; pinc=NULL; free(pina); free(pinb); free(pinc); pina = (int **) malloc (sizeof(int *) *c); pinb = (int **) malloc (c* sizeof(int *)); pinc = (int … | |
Can C++11's Mutexes be used for Inter-Process Communication? In other words, can it be used for shared memory and signalling an event? Currently, I'm using CreateEvent and SetEvent from WINAPI and I wanted a cross-platform way of doing so without doing #ifdef windows and ifdef linux, etc.. I use CreateEvent … | |
In our university following registration numbers are assigned to students 786-FBAS-BSSE-F12 Where 786 is student ID, FBAS is faculty, BSSE is degree program and F12 is Batch. Write a program that reads registration numbers of 20 students. Use array of structures for storing student information. Provide user with following menu … | |
Task Your task is to write a file archive utility similar to that of the Unix tar program. This program will be a command line program (i.e. there will be no graphical user interface). The purpose of this file archive utility is to allow users and system administrators alike to … | |
Hi I have written a program, it doesn't work and i can't figure out why. It does compile, but it doesn't run. The whole program: #include <stdio.h> #include <stdlib.h> #include <ctype.h> int main() { int a; int j; int c; int d; int dig; c = 0; int i; a … | |
A player is good if the following conditions are satisfied: He is either from “India”, “Japan” or “Korea” He has a minimum of 3 years of experience He has won at least 3 major tournaments, and one of them must be "World Championship Tournament". He must know more than 10 … | |
i need my program to read in a file reverse it then write the file out. i got the reverse correct but its not working.my errors are: n.c:12: warning: passing argument 1 of 'fopen' from incompatible pointer type n.c:21: warning: passing argument 1 of 'fopen' from incompatible pointer type n.c:22: … | |
Im incrementing a value in a while loop, but its only incrementing when my mouse is moving. Any ideas? while (isAlwaysTrue) { value += 1; } Thats basically what Im doing. | |
hi friends I've a code to compute integral with area function in code. I used Fork, and for returned values I must use shared memory. now I need to embed a semaphore in my code to control the critical area(here is shared memory). I don't know how to embed semaphore … | |
Hello, I am trying to compute the GCD non-recursively. I have no errors but when I run the program it aborts because it says c is not intlized. [code=cplusplus] #include "stdafx.h" #include "stdio.h" int main (void) { int a,b,c,r,result; printf("enter a value for a\n"); scanf ("%d", &a); printf("enter a value … | |
Hi, can u all help me with a question. I have been given two boolean 2d square arrays. 1st array is one having random true or false values. 2nd array is with all true values. Suppose eg n = 4; 1st array : false true false true true true true … | |
Hi! I am learning C, and am at very introductory level, using this book called C Programming: A Modern Approach. I have just studied about arrays, and while tackling the programming exercises,i got stuck in Que 9 in Chapter 8. This is what the question says [INDENT]Write a program that … | |
Any one can help me out i want to display a spiral of n*n size with out using arrays? out put when n=2 should be 3 2 0 1 when n=3 should be 8 7 6 1 0 5 2 3 4 when n=4 should be 15 14 13 12 … | |
Hi I have started learning C and my first problem is very simple. I can't get output from a program! What am i doing wrong? #include <stdio.h> #include <stdlib.h> int main() { int a; int c; c = 0; int i; a = 0; for (i = 0;c = 0;i++) … | |
#include<iostream> #include<algorithm> using namespace std; #define MAX 10000000 #include<stdlib.h> #include<string.h> char s[MAX]; int p[MAX]; int bucket[MAX],nbucket[MAX]; struct suffix { int idx; }pos[MAX]; int H=0; bool cmp(struct suffix i,struct suffix j) { if(H==0) { return s[i.idx]<s[j.idx]; } else { if(bucket[i.idx]==bucket[j.idx]) { return bucket[i.idx+H]<bucket[j.idx+H]; } else { return bucket[i.idx]<bucket[j.idx]; } } } … | |
Hello, I'm new to C# development. I've been working on a C# project (management system). Depending on the requirements i may have to build further versions of software. I want to know how to build the database such that even when i install next version of software, it would load … | |
This is my code... i'm getting error that "Primary expression missing" in all places where i have ritn desc[i].code or desc[i].cost. May be i'm using wrong syntax for strcutures; #include<iostream> #include<conio.h> using namespace std; struct desc { int code; int cost; }; void del(int x, int count) { int i; … | |
Hi All, I want to know how to list the all the symbols in the shared library(dll or .so file). I dont want commands like nm or objdump. I want to get the list of functions available in shared library programmatically at runtime (after calling dlopen and dlsym). Is there … | |
Hi , I am able to compile my program , which simply connect to mysql and prints the table result. But I am unable to compile it with Makefile. Any pointer will be appreciated. My program: [code] #include <mysql.h> #include <stdio.h> main() { MYSQL *conn; MYSQL_RES *res; MYSQL_ROW row; char … | |
Hi people, I am a beginner C learner and I'm having a bit of trouble checking a structure to see if its empty or not. I am writing a program for a phonebook/contact book and I have everything working actually but I want my program to check all arrays in … | |
Hey guys,I'm new,but I study C programming language and I have this awfull problem. I have make a matrix A[n][n],in which n is an odd positive number(of course),and the matrix must "unwrap" itself with the number 1 in the middle then 2 to the top,then clockwise 3,4,5,..etc,until it wraps the … | |
I have an int64_t value which I'm trying to write to a file. `fwrite(&page->id,sizeof(page->id),1,tid); if the value of page->id == 00 00 00 00 00 00 00 03, then the variable is written correctly as 03 00 00 00 00 00 00 00. However, if the value is 00 00 … | |
change the book or something? | |
[QUOTE=stackOverflow;164345]Hi, Oops sorry! I had not put double slash in the "path" in initgraph. :o Its working now. Anyway,thanks a lot. And the OS is xp.. but i don't get it.. how does it matter??[/QUOTE] hi, i've the same fucking problem: My PC failed and then I must to move … | |
I'm not really getting the bigger picture with regards to linked lists. What needs to be done to link it? Also, there is an error with strncpy and for some reason on line 35 its not recognising struct trainset anymore and calls it a undefined variable. #include <stdio.h> #include <stdlib.h> … | |
I need to write a program that gets content of txt file and display all 4 letter word . Can someone help ? | |
Friends, i have to submit a project on Car Rental System which is to be made in C. i have made half of the work like giving out the menus using Switch, but the prof told me that i have to now input the details of the customer and then … | |
Hello All, I was doing some multi-threaded programming using the new C++11. This thought came across my mind: Is there any problem if some shared data is accessed by multiple cores on a CPU? Even if it is just a read. Does this lead to some problem? Could anyone please … | |
Hello, Can you please suggest me some 3rd party C++ libraries like RogueWave SourcePro C++. Thanks in advance, Amit M. | |
Hi every body, i want to get a data from List<T> so; class Npc : IDisposable { public short id; public float fX; public float fZ; public float fY; } internal List<Npc> m_arNpcArray = new List<Npc>(); I want to get data like this; m_arNpcArray.GetData(int id); GetData() { for(int i = … | |
hey.... i want a project on computer shop........ could u can plzzz,,,,,,,,,,,...... | |
i need c++ code for simple linked list to implement algorith and data structure 1.create_node_and add to list 2.frst node delete 3.last node delete 4.delete node between first and last node 5. displaye the value of node in revese order 6. searching 7.exist | |
i am a computer science students and one of our project this christmas vacation is to create c++ programs and we will submit it on the 3rd of january but i dont have idea where can i find it anyone please could help me thanks... | |
i have written this code to copy 5 names in a structure #include<conio.h> #define loop_count 5 char copy_name(char *); typedef struct{ int count; char name[3][20]; }student; student *p; //declare structure pointer; int main() { student s; //declare variable of type student ; p=&s; //giving p address of s; p->count=0; //initialize … | |
I have tons of files in this project as I am programming an ARM board. Making a tilt snake game where the snake is controlled by an accelerometer. I am using a timer interupt (handled by timer0.c) to toggle a boolean variable `extern bool toMakeFood;` stored in "includes.h" that tells … | |
**CODE** #include "stdafx.h" #include<iostream> #include<conio.h> #include<string> #include<fstream> using namespace std; //---------------------------Function Prototypes----------------------------// void titleheader(); void menu(); void addbook(); void display(); //--------------------------Main Function---------------------------------// int _tmain(int argc, _TCHAR* argv[]) { int op; titleheader(); menu(); cout<<"\nPress option key to activate the required function: "; cin>>op; switch (op) { case 1: { system("cls"); titleheader(); … |
The End.