15,551 Topics
| |
I am trying to ask for a float input and valididate if it is a float if it is... continue, and if it is not ask for another input. My program tells me my input is invalid, which is correct... it then prints the two statements but it skips the … | |
hello friends. i have i simple c/c++ function that return the min of the array to the main function, in the body of the function i'm using an iterative loop so i would like to do it recursivly and i don't know from where to start! all reply are usefull … | |
| |
Suppose if I am working out with a simple basic coding to write a C# program for odd even number. But I am stuck at the step as to how i can re-enter input while i am converting a string into integer at one place. | |
/*CODING A PROGRAM FOR LOGIC GATES*// #include<stdio.h> #include<conio.h> [CODE] int x,y,z; //printf("Enter value of x"); scanf("x:",&x); //printf("Enter value of y"); scanf("y:",&y); And(int,int) if(x==1&&y==1) printf("z=1"); else printf("z=0"); Or if(x=0&&y==0) printf("z=0") else printf("z=1"); Not if(x==0) printf(z=1) else printf(z=0) [/CODE] | |
Hello all hope all is well, Im new to c# and new to the site so bare with a noob :). any way I have an assignment and Im running in to a problem where I don't know how to have c# read a text file and turn the numbers … | |
Hello, I am having two problems with three C sursor screens I coded, using the curses library. The first problem is that a field will not highlight when I move the cursor to that field, even though I use the wattron command to highlight it. I can get the highlight … | |
I have been struggling with this for two days now, with no luck. I have a **C** `char` array `char myArray[] = "Hello World";` I also have a pointer to pointer to *char* `char **ptr;` So I want to somehow store `myArray` to `ptr` or somehow convert `myArray`into pointer to … | |
Hi All, In below code snippet multithreading is used to take care of multiple requests from client. I beileve creating and detaching thread will eat lots of CPU cycle and it won't improve the CPU utilization as well. Can anybody let me know if thread pool can be used here … | |
void Halt (); void Reply (const char * num,uint8_t stat); { this is the error message for this code 7|error: 'uint8_t' has not been declared 9|error: expected unqualified-id before '{' token | |
Hello guys, I have this structure with another double pointer structure inside that I need to pass through named pipes with the function WriteFile from WinAPI. typedef struct Labyrinth{ Cell **board; int currentLevel; } Labyrinth; typedef struct Cell{ BOOL wall; BOOL player; BOOL object; BOOL enemy; BOOL labyrinthExit; int objectType; … | |
Hello, I am having a problem with the fgets statement not reading data correctly. It reads most of the data I need without a problem, but three lines of data are not read correctly. The code in question follows: strcpy(passw,"P7"); fscanf(fip, "%3s", ckod); /* card # 164 */ fprintf(ff16,"\n\n%12s%12s\n", "card# … | |
Hello, I am developng a screen for a state to enter special rates to augment its unemployment trust fund. I have the screen coded, and it compiles cleanly, but when I try to run it, the screen does not come up. There is no error message and no file I … | |
Guys i cant imagine about how i'm gonna calculate that one... help me out please | |
I need help with the following program: Create linear representation of stack with size N. Stack contains N binary search trees with serial number of the position on the stack from 1 to N and with the minimum p and maximum q nodes in a tree. Values p and q … | |
I am trying to reverse a word using pointers but the problem that the following line cause error:access violation writting location 0x000... *temp = *(n+len); the full code #define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<stdlib.h> #include<Windows.h> #include<string.h> void re(char *n){ int len = strlen(n); char *temp=NULL; while (len != 0){ *temp = *(n+len); … | |
Hi there, I am an undergraduate studying computer science. Our lecturer gave us an assignmnet to use Dapfor grid control display both authors name and their book. I don't know where to begin from. Can anyone put me through; maybe with an example. | |
fatal error: pwd.h: no such file or directory, I got this error when trying my code when using the following library #include<pwd.h> | |
[B]hi friends[/B] this small compact code is for printing any number of prime numbers in C Language, you just have to change the last line's 500 to any number you want, here some points necessary to understand the code are as follows- 1.> variable torf stands for true or false,in … | |
Hi all. I am new in C language. I am learning to program by using C for my first step. Now I am reading a chapter about looping (while, for, do.. while, nested loop). In my exercise book, the question is about to: Using nested loop to print out this … | |
Hello, I'm just new here. I wanted some people to help me with my project. We were tasked to do a game using Turbo C. I already found some games that has source codes like snake, tic toe, etc. I wanted to be slightly different 'cause I know my classmates … | |
I wrote this code : #include <stdio.h> int main() { int a,b = 10,c,d; a = printf("b is %d\n",b); c = printf("a is %d\n",a); d = printf("c is %d\n",c); printf("d is %d\n",d); // lose a null terminator in the previous strings ?? c and d // are 7, but a … | |
I have four array of strings. I would like to print out the strings with this formatting: printf(" %d \t %s \t %s \t %s \t %s.\n", quadruples_line_counter, strings_quadruples1_action[0], strings_quadruples2_variable1[0], strings_quadruples3_variable2[0], strings_quadruples4_temp_variable[0]); It gives this output: 17 func sub int 3. 17 param (null) (null) (null). 17 alloc 4 (null) … | |
Hi there. I've been trying to wrap my head aound this seemingly simple problem. I am write a game and I need to show on the screen the number of seconds the game has been playing for. This is the best way I can come up with but it doesn't … | |
Write a program that accepts five input values and stores them into an array. The program should then display the average of the five numbers. Finally, the program should display all the numbers in the array that are larger than the average of the five numbers. So I did the … | |
In the str char array below I would first like to locate the first math symbol I see, then I would like to count backwards and remove whatever is between the previous three " _ " and remove the three " _ ". Can I please get some ideas on … | |
How does this compile? I forgot to set my second condition in my second for loop and it compiles. if(cmp_str5 == 0 || cmp_str6 == 0) { if(cmp_str5 == 0 || cmp_str6) | |
Hi, I'm still a beginner for C programming. In my assignment I've encountered this problem and I know is a linker problem but I'm not sure how to solve it. I'm trying to link 3 files which 2 .c files and 1 .h file. Below are the codes for my … | |
Here is a small e-Book for your attention: [The Ultimate Question of Programming, Refactoring, and Everything](http://www.viva64.com/en/b/0391/). This book is intended for C/C++ programmers, but it could be of interest for developers using other languages as well. What makes the book peculiar is the descriptions of real, not theoretical cases at … |
The End.