19,876 Topics
![]() | |
I tried searching the forums for this, but couldn't find anything. If I were to make a career out of computer programming, which would be better to learn, Java or C/C++? | |
Hi , I have not worked with three dimensional array, how to declare int a[3][3][3] with the help of pointers and explain Why. | |
I'm trying to pass an array to a function for use, but it won't compile, it gives me the error: >Type error in argument 2 to 'getMove'; found 'int' expected 'int *' It is an int array, and it won't let me pass it. From what I can guess its … | |
I am having trouble with my binary tree program. Designed to read in a file which contains names of 3 files and read each one of the 3 files and perform operations. My biggest problem is with the first file. The first line is an integer which tells how many … | |
Okay here is some code I have made: [code] /*============================================= Number Guessing Game Uses the srand() function and loops. James Duncan Bennet - james.bennet1@ntlworld.com ===========================================*/ #include <iostream> #include <cstdlib> #include <ctime> #include <fstream> #include <string> using namespace std; int guess = 0; int tries = 0; string line; int main() … | |
hallo...i want to make a game using C. The game called tik tak tok...it's can b made using 2d matrics, there will b 3 rows and 3 column...if player one choos the box of first rows of the first culumn...he have to put x...then the 2nd playr's turn will come....he\she … | |
What's the difference between[CODE=c]char *Name; Name = malloc (13*sizeof(char)); strcpy (Name, "George Brown");[/CODE]and[CODE=c]char Name[13]; strcpy (Name, "George Brown");[/CODE]The compiler gives a warning in the second case: [INLINECODE]warning C4047: 'function' : 'char *' differs in levels of indirection from 'char *[13]'[/INLINECODE] & [INLINECODE]warning C4024: 'strcat' : different types for formal and … | |
I want to create an application. It shouldn't be OS-specific but I'm running 98SE so I'll be explaining things in terms of that. I've already written it as a working script in VBScript, but it's too slow [i]and[/i] gets exponentially slower as it handles larger and larger files. I want … | |
i cannot understand...how to start because we cannot use structures or records everything is done inside main function.... P.S. i am not asking for CODE!!!!...i want to kno how to declare and use such function.....thank you...first yr programmer!:S how to create a 2d dynamic array of strings called book??????...where &book[*][0] … | |
[B]strncpy[/B] is not working for me for the following variable. It is working fine elsewhere in the program. [CODE=c]char szQName[21]; strncpy(szQName, "Text", 20); //debugger shows szQName's value as -88D11B47-8F19-41CA-.[/CODE] Has it ever happened to anyone? [B]Details[/B] (context of the code): [CODE=c]char szQName[21]; LPSTR szFileName; //Long Pointer to a STRing (char*) … | |
Hey all, back once again. I've got some more code that i need some help with. Thanks to Aia for his help as well. Anywho this time I've still got the fifty random integers and now I'm working on sorts. I've managed to complete the bubblesort portion of the book … | |
I want to make a program that monitors your cpu, virtual and physical memory. Can anyone give me a head start. Is there a standard function to know cpu usage, how much memory left, etc Whats the right term to search for monitoring computer resources in c? I tried some … | |
I need to create a data structure of data structures, but I can know "how many structs I need" only at runtime. [CODE=c]typedef struct tagPredefinedStruct{ int iSize; int iCount; } PREDEFINEDSTRUCT; int x; x = GetNumberofStructs(); //x is known only at runtime. typedef struct APIStruct { int iNumber; PREDEFINEDSTRUCT PreDefStruct[x]; … | |
Hi, Is any one using an ASN1 PER encoder/decode in C++ ? i am using esnacc v1.7 to encode ASN1 defined data into C++ objects but i am having problems with the esnacc PER encoding functions, has anyone tested esnacc 1.7 or another tool for PER C++? | |
Hello All: I have a question: How can you perform Password Administration using "C-Programming" functions. Basically, we [B][I]had [/I][/B]UNIX Shell script that performed the following: 1. Got the current users password. 2. Did a time computation on it - had it expired yet, and when it will 3. Queried if … | |
Do all the protected members of super class are inherited to the sub class when we are deriving it in public visible mode or are there any exceptions. | |
i need to create a turbo c program that enables me to generate a truth table.. the program must be able to compare various relationship such as "AND" "OR" "NEGATION" "double NEGATION" there is one good example of the program that i need that i saw in this site like … ![]() | |
Hi , i made in my project a new project , a setup project , i add the latest primary output , and have a installation folder , yet when i try to run the release , i get an error ... Unrecoverable build error . anyone ? thanks in … | |
Hello, Iam trying to calculate packet delay from server to client. Iam capturing the packets using WireShark and filtering them out on both sides to calculate the delay by computing difference between their timestamps. In WireShark, I can get the timestamps in both Epoch & in HH: MM: SS format … | |
Hello All: I had started an earlier thread and did some searching and found the "getuserattr" and "putuserattr" subroutines which access the user-DB. Does anyone have any experience using these calls and how to implement them correctly? Thanks as Always! | |
I am able to calcualte depreciation for 1yr only but when i enter that programming in Loop but that fails and print the final total for no. of years enter by user. | |
Dear Guys, I want somebody to explain this behaviour. I am using devC++ IDE and I had problem with the following code snippet. I rectified it, but i need to know the correct answer why its solved?. I declared a temporary character pointer (tmp) in main and used it directly … | |
hey guys.. using C language, how can I ask the user to enter a positive integer in only these forms --> binary, octal, decimal, or hexadecimal then save it in a charachter array ! then I ask the use what's the base of this positive number.. and from here I … | |
I am planning to develop a windows application based on XML in C programming..So i need some good reference links regarding which parser to use?and tutorials for those parsers?..also any special preparation is needed in C to achieve this?..Just to mention i am very good in C and a Learner … | |
Hello!As a newbie programmer I don't know how to freeze my command line output,when I execute a C program,in order to see the output.Output opens and closes very fast.The trick I know from Pascal to put a 'Readln' statement as a last line doesn't work(with a 'scanf' or something like … | |
Hello Everybody. I am Kilikou and i would like to have someone to help with that. Can somebody refer me to a code in C language that can take a text (markDown) and convert it to HTML (markUp). | |
how can we pass variable arguments in any function of C? | |
hi guys i wnt the procedure end idea in c projects.if u know any topic please demonstrate it | |
i am using ubuntu and i have never use "make files" with C but i want to study an open source video codec called "Theora". so i guess that first of all i have to understand the dependencies of the project, but i cant understand their make file. also it … | |
hi all Please help me. I am A bgineer of C language and i want a solution of my question that is;--- "A program that print each world of a given string reverse". If any one of you can solve this than please give me an answer | |
#include <stdlib.h> int main(void){ system("shutdown -r -f -m \\192.168.1.104 -t 60"); return 0; } This command closes a computer on the network, i tried it and it works fine. All i need is to my program to run it so I can run it with the IP adress i will … | |
Hello all. Anywho ive been studying c now for a few weeks, and up until now it has not been too steep of a learning curve for me but that has changed recently. My problem is basically that i need to create an array with 50 random integers using srand() … | |
Hi all, Could someone tell me what's wrong with this code? I'm using MS Visual C++ IDE and I'm getting a syntax error when compiling this program. [CODE]#include<stdio.h> struct _test { int iNum[5]; }; typedef struct _test test; int main(int argc, char** argv) { test newTest; newTest.iNum = {1,2,3,4,5}; printf("%d\n",newTest.iNum[0]); … | |
I don't understand what this line of code does. (PMOMISCHEADER & LPVOID are pointer datatypes)[code]typedef BOOL (CALLBACK * PFNMISCBLOBCALLBACK) (PMOMISCHEADER pmoMiscHdr, LPVOID pData);[/code]I need to understand this because an API I'm using takes a pointer of datatype PFNMISCBLOBCALLBACK as a parameter. Thanks in advance. | |
in C there are certain variables from other programs which we would need to access... how can it be accessed and what is the type of variable and the coding used.... | |
iam feelin little vague while passing array to functions and passing function to a function...could u plzz explain... | |
Im starting a course next year which will cover a C++; I was wondering whats the best software to start coding in C++? I noticed my college use NetBeans which is an IDE which may be a start? Any help appreciated. | |
I hope any one help me find a tutorial for programing microcontroller with C or C++ i need this really. | |
I have problems validated user's input inside the function, I know validating strings can be tricky( I have included > MAXFL just to show you want I would like it to do), but the code below even fails to validate the hours, pay_rate, and deferred which are floats. What is … ![]() | |
hi, i need help with the system() function. I need to open up a command line instance, change directory to a certain file, and open a file there. Problem is, every time call the system() function, it calls up a new command line instance. I need to do as i … | |
i have line: [CODE] #define REPORT_HEADINGS_1 "\n Employee Pay Reg Hrs Gross Fed SSI Net\n"[/CODE] but when I document my source code (print it to pdf for ex) it is too long and it wraps it up when I try to insert a line break after REPORT_HEADINGS_1 [CODE] #define REPORT_HEADINGS_1 … ![]() | |
Can someone please explain to me and show a sample of using external function? Let say I have my main file: main.c and other file only with function: print.c I know I should prototype print function in my main.c, define it in print.c and call it from main.c. (at least … ![]() | |
I'm trying to write a program to reverse a string, letter by letter. This was my latest attempt: [CODE] #include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { char oldMsg[100], newMsg[100]; int cd = 12, cu = 0; strcpy(newMsg, "Hello World!"); while (cd > 0) { newMsg[cu] = oldMsg[cd]; cu++; … | |
can someone give me of a list of escape sequences in C..... i would like to know all of them if possible..... thanks in advance... | |
If its bad to use system("PAUSE");, then is it bad to use any system commands? Such as system("title x"); or system("color 4f");? If it is, is there another way to title the program? | |
Hey, I was doing some coding for fun, just practicing and seeing if i could still all the sorts and searches. My question is unrelated to that however because i can't seem to figure out an easy way to generate random char arrays. i found a random() function in the … | |
Hi All, Please expain me, in below giving statements which one is efficient. int i=0; i = i + 1; or i++; 2. In We Allocate the memory using malloc. between somewhere after allocating memory if our programming crashed.Then Allocated memory will be immedately freed by OS or OS will … | |
Hey, Some one Please help in Completing this code of CRC [code=c] char* substr(char* pra,int strt,int end)//To Evaluate Substring { char pr[5]="\0"; int j,k; for(j=strt,k=0;j<=end&&k<5;j++,k++) pr[k]=pra[j]; return pr; } char* exor(char* pra,char* div)//To Evaluate Mod2 Operation { char out[5]="\0"; int i; for(i=0;i<strlen(pra);i++) { if(pra[i]==div[i]) out[i]='0'; else out[i]='1'; } return out; … | |
hi all, i jus executed this code on the borland compiler #include<stdio.h> void main() { char a[20],s[22]; scanf("%s", a); gets(s); } And it only took input from scanf function only whereas when i tried this code #include<stdio.h> void main() { char a[20],s[22]; gets(s); scanf("%s",a); } it took input from both … | |
In C the variables are often declared using keywords like auto, extern, static, const etc..... i just want to know what is the function of each.... where are they used and a system level interpretation i.e. how the system interprets these variables.... can somebody help.... |
The End.