19,876 Topics
![]() | |
how do i create archive and save a struct in archive. Thanks in advance. | |
Can anyone tell me whether it is allowed to use a Semaphore in a Reentrant function. | |
There is a problem in this code. I don't know what to do. If you try to compile it, says: transformaclave[const *char] cannot be distinguished from tranformaclave[ const char* const] can anybody help me??? thanks anyway. [code=c]////////////////////////////////////////////////////////////////////////////////////////////////// // // // UNIVERSIDAD DE PALERMO // // // // TRABAJO PRACTICO DE … | |
Hi, I am trying to implement the sizeof() programe main() { int a,res; a = sizeOf(a); printf("size=5d\n",res); } int sizeOf( void var) { void *ptr; ptr = &var; return((char*)&ptr[1] - (char*)&ptr[0]); } But this is giving error , so plz check and correct it | |
Hi, I'm wondering how to give a map a fixed size like you can give an array a fixed size by just "byte data[SIZE*DATASIZE]".. or if it's possible anybody know.. struct Table { map<int, int> table; // }; struct Table *flightChart; The reason I have to give this a fixed … | |
i can write a palindrome pro but i dont to write using recursive function can any body help and to check whether a palindrome can fotmed from a given string? j=0,k=0; while((j<strlen(str)-1)/2) { if(str[j]!=str[strlen(str)-1-j]) { k=1; break; } j++; } if(k==0) printf("palindrome") else printf(not a palindrome"); | |
how can write a orogram to check whether palindromw is posiible from a given stirng for(i=0;i<strlen(a);i++0 { if(a[[i]==b[i]) printf(a[i]; ) } | |
pls help just started learning c++ and cant get my head around how to do this: write prog for data logger which records one reading per day at a specific time for 5 days.the logger records in the format:n1805071500 the first letter preceding the numbers can mean one of below … ![]() | |
Q.Using recursive function,reverse a string. Solution I tried [CODE] #include<stdio.h> #include<string.h> char reverse(char *ptr,int length) { return ptr[0]=ptr[length-1]; while(*ptr!='\0') reverse(ptr+1,length-2); } int main(void) { char string[40],answer; printf("Enter string\n"); gets(string); answer=reverse(string,strlen(string)); printf("%c",answer); return 0; } [/CODE] It gives an error sayin 'Unreachable code in function reverse(char near*,int)' because of the line … | |
Hi, im starting here with C and im stuck with a little problem...can someone helpme plz. The program is a ASCII to morse converter #include <stdio.h> #include <stdlib.h> #include <string.h> char text[200]; int x, y; char *characters[49]= { "------",".----", "..---", "...--", "....-",".....", "-....","--...", "---..", "----.", ".-", "-...", "-.-.", "-..", ".","..-", … | |
I want to know when it is necessary to include a return statemnt in one's code and also what is the difference between recursion and iteration? | |
How would I create a desktop launcher of my application? I am using ubuntu.. All I want is to compile the program using Makefile and during the compilation it will then create a desktop launcher automatically. thank you... | |
Gud day, Suppose I have these files: hello.h hello.cpp main.cpp in what directory will I put the hello.o and hello.hpp so that I will only type $ g++ main.cpp -o main not, $ g++ main.cpp hello.cpp -I. -o main.cpp in the terminal.. thanks.... I will highly appreciate youre response.... | |
I want to pass a 2D matrix to a function in C which modifies the elements of the matrix and the modifications should be effective in the calling function. How to achieve this in C. | |
Hi , I need to Assign 4 bits to unsigned char: I am using, unsigned short Ver : 4 ; My ques is ... howw do I initialize Ver , coz Ver=5 is not working.. If i need a type cast.. what will it be??? | |
i have problem that i could not solve it.. here is the problem [URL]http://ceng.metu.edu.tr/~bozyigit/cng140/hw.html[/URL] HOMEWORK 3 | |
if anybody wantt to help plz give me email that i can ask my problem with detail for solving | |
Hello, I am trying to read data from a text file in the following format: 05 mike smith 30.00 2 1 so the format is: int, character[21] = max size of array, double, int, int I am trying to read the values into an array of objects. I can read … | |
I've gotten myself a bit confused here. :'( I've created two linked lists called 'competitors' and 'races'. I'm able to add, append and display info in both files but unable to delete or update the information contained in either. I've started the coding for both functions but have got totally … | |
Q.Write a program to input data in an array.Compute the sum and average.Then count the number of values greater than the average and lesser than the average.Print the average,sum and the two counts. Solution I tried [CODE] #include<stdio.h> int main(void) { int X[10],i,lesser=0,greater=0,sum=0; float avg=0; for(i=0;i<10;i++) { printf("Enter number\n"); scanf("%d",&X[i]); … | |
for using file i must read file but file is text i read aword from any line but with see the space i find i read a word but program not accept "" such a spce and give err and for give next line wat i do? | |
I just was wondering why the array its self are a pointer to the first element? and what is the difference between an array and a pointer? | |
Hello community,, I have been developing a yahoomessenger chat client for nintendos handheld gaming console 'nintendo ds'.Till now i have finished laying out the user interface and wifi access via router. I found the yahoo protocol in many places from a google search but i am unable to understand how … | |
Hi guys, I startin the project of a (web) server in c++ and i want to able to manage about 1000-2000 clients. I have been reading alot about Single-thread VS Multi-thread server and i wanna know what u guys think about it. I do not plan on using one-thread-per-client because … | |
Hi, This function that I've written works well when compiled under the Turbo C compiler on windows XP but it says Segmentation Fault while it runs on linux after compiling with cc Compiler. I've been trying to think what might be wrong....I'm just wasting time....Please help me solve this bug. … | |
how can i create the byte and word data types. Im using a header which requires word and byte data types for execution of data. where as my compiler dun accept those types. how can i implement them? thank you in advance. regards, Shrikrishna | |
i'm writing a pseudocode for a program that ask a user to enter a data and the program should forced the user to enter a required information.using a for loop. the program is like this. women between the following agea 20.20-30,32 above men between the ages 20,20-30 and 32 above … | |
does anyone know what this error actually means? terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::substr it happened when i wrote this line... string output2 = last + first + scores + string(4, ' ').substr(scores.size()) + " "; | |
hi im making an exercise about two arrays. one is a working like a stuck (LIFO-Last in First Out)array and the second one like a queue (FIFO-First IN First Out). The problem is that im confused what to write in the case 3 and 4.....:?: Any additional help about compiler … | |
[B][U]Before You Ask[/U][/B] [list=1] [*][B]Engage your brain![/B] We understand that running into a problem can turn off the rational centers of the brain, but please sit back and think for a bit about your problem before running off to find help. All too often a little common sense is all … | |
Hi! I have one project. The title is Engineering Journal Program. I don't know how to start and please help me... Below is my program description.... [B]Engineering Journal Assignment[/B] Problem Description: You are to write a program to manage an engineering journal. An engineering journal is a record of a … | |
Good night; can you see this function ; its true but the only error is : missing ';' before 'return' missing ';' before '}' missing ';' before '}' missing ';' before '{' missing function header (old-style formal list?) but there is no ; missing , i checked it twice this … | |
Hello once again people; I hope I'm not breaking any rules or being cheeky. But I was searching for algorithms/programs on the internet that would help me with my binary search program, and then I came across the piece of code posted here (in the code snippets section)about just the … | |
I have just learnt C so I always meet some problem Could you tell me the meaning of this code? [CODE] void InsertListOrder(Nodeptr &Head,Nodeptr G) { Nodeptr P, Q; P = Head; while (P != NULL) { if (strcmp(P->key.tu,G->key.tu)>0) break; Q = P; P = Q->next; } if (P == … | |
God Reveals DNA Secrets For many years molecular biologists have been mystified by the fact that very little of an organism's DNA seems to serve any useful function. Last night God revealed the mystery by posting the code on a warez site. I am just posting the first segment of … | |
i've gone through some threads from people asking for help that have posts from these users saying things such as [quote]still the program doesn't do what i want it to do[/quote]This is why i would like to say to all users: [B]When we post solutions to your questions, most of … | |
[B][COLOR=#000000]Write a program that will compute the quarter/semester grader for all the students in a class. Scenario is as follow: [/COLOR][/B] [COLOR=#000000] [/COLOR] [LIST] [*][COLOR=#000000]There are total of forty students in any given class. Each student has twelve graded items. Each student is given four tests, four programming assignments, and … | |
Hi I want to play file in reverse(rewind) in direct show also I want to play it frame by frame . can any one help me | |
automatically generated with the format of V000# how??? | |
hi all, i have a question 1) how can we change the value of a macro during compilation time tell me with an example 2) what is difference between exception and memory leak. how to handle exception in c 3) where are the extern and register variables stored(text,data,BSS,heap,stack) | |
Hi again everyone. I'm having a problem with some code I am writing. I need to take an input file change what is on it, then print out to the screen. What I want to change in the file is re-formatting it so that there is Last name First name … | |
Hi, This is satya, how we can print a string in C that doesn't use printf in main or functions? plz help on this Thank u.. | |
i have ceated a file in C. i have to give the login security. i already gave the user name & password. but when i type the password the letters are visible how to hide the letters ![]() | |
Q. WAPC to read a string into an aaray and capitalize the first character of every word in the input. Solution I tried [CODE] #include<stdio.h> int main(void) { char string[50]; char *ptr; printf("Enter string\n"); fgets(string,sizeof string,stdin); printf("string= \"%s\"\n",string); for(ptr=string;string!='\0';ptr++) { if(*ptr==' ') { ptr++; *ptr=*ptr-32; } } printf("The new string … | |
Hi to one and all, this is satya, I few doubts in c those are, All are linux based, 1) How we can convert physical address to virtual adress and vice-versa,for this any linux system call. 2)How a float will store in binary format. 3)what the use of constant volataile. | |
hi all, i am writing a program in which i am checking if a string contains another string(same what strstr does). i assumed intially that the string1 is a long string with spaces and string2 is a word(which might be or might not be present in string1) i have used … | |
I must display the number of values that are above, equal to, and below the average, with "equal" being within a tolerance .01. [code=c] void RelToAve (double ave, int numRead, double *array) { int abo = 0, equ = 0, bel = 0, i; for (i = 0; i < … | |
If I am somehow in error posting this, I apologize. However, I would hope that this is the best place to ask this question. I am dealing with a MSVC Compiler, version 1.52, on a system running Windows 98. I am using these rather antiquated pieces of equipment for a … | |
hi, I have been trying to get into C++ for a while now. My background is in VB.net. I do have experience programming with C++ (and some C) through my classes, but nothing complex... the biggest thing that I seem to be having trouble comprehending is how data access is … |
The End.