15,552 Topics

Member Avatar for
Member Avatar for loverdoll

hi? i'm in need of help.. our instructor in computer programming asked us to make a program..mine is a program that will ask the user to input how many sides of polygon she/he wants..minimum of 3 and maximum of 10..and the output should be the polygon with the user's inputted …

Member Avatar for loverdoll
0
101
Member Avatar for ChrisXxX

OK, here's my sample code. The problem is indicated with [PROBLEM] at the starting of the code line. I'm getting a compilation error saying that: 706 C:\Users\user\Desktop\Project.cpp `reg_num' has not been declared 706 C:\Users\user\Desktop\Project.cpp request for member of non-aggregate type before ',' token and its saying this for all my …

Member Avatar for WaltP
0
103
Member Avatar for revenge2

hello there, I am working on a small c program that automatically detects whether the input given is a decimal number or a binary number and coverts accordingly. what is the best way to convert a binary number to a decimal number and a decimal number to a binary number. …

Member Avatar for akirue09
0
524
Member Avatar for matika

[FONT=Lucida Console][COLOR=Blue]is there any function that helps to sort an array of strings alphabeticly i need to sort an array alphabeticly which contains names of students thx 4 yr help matika :cool: [/COLOR][/FONT]

Member Avatar for sachin_mnnit
1
755
Member Avatar for sam_021

Hi basically i dont have time to do this coursework , due to overload of work .. it probably take like an hour for some1 who knows what they are doing .. ill pay like 15-20 quid ?

Member Avatar for Aia
-3
31
Member Avatar for Freespider

hello... i want to separate string like "!string" i need to put the "string" to some char*... i did char firstWord[10]; sscanf(text,"!%s",firstWord); why its not woking? and how to make it work? i try to search, but nada....

Member Avatar for WaltP
0
130
Member Avatar for elie_kfoury

Hey.. i want to make a string from a text file.. then i want to compare this string with another to see if they are the same... any help?? /*I'm a beginner*/

Member Avatar for elie_kfoury
0
93
Member Avatar for omar isaid

fscanf is a C function designed to read character by character from a file to the system how we can use scanf programmatically to read till first white space ???? :) :)

Member Avatar for omar isaid
1
3K
Member Avatar for aliase

Hi, The problem I'm having is killing a process without knowing it process ID. What I have right now is a client-server communication using FIFOs, the server is running in the background and the client is running in the foreground. What I want to do is when the client quit, …

Member Avatar for Salem
0
91
Member Avatar for abhishekvarmag

Calendar Program [code]#include<conio.h> int day(int m1,int y1) { int d; if(m1==1 || m1==3 || m1==5 || m1==7 || m1==8 || m1==10 || m1==12) d=31; else if(m1==4 || m1==6 || m1==9 || m1==11) d=30; else if((y1%100!=0 && y1%4==0) || y1%400==0) d=29; else d=28; return d; } void main() { long unsigned …

Member Avatar for Aia
-3
792
Member Avatar for anik biswas

hi, I cannot figure out the programme code for the following problem: Write aq programe code for printing all the combinations of the numbers 1,2&3. I would be gratefull if you can help me out with this. Thank you.

Member Avatar for Adak
0
86
Member Avatar for TimCereja

This has been working fine on my system, but refuses to compile on a server that I've uploaded it to. printf("Press <ENTER> to Continue\n\n"); while(getch() != 0x0d); The error message that I get is: undefined reference to 'getch' Any idea how to define getch and get this to compile?

Member Avatar for Ancient Dragon
0
91
Member Avatar for lionaneesh

Hello everyone, Firstly i'll like to introduce myself to the forum. HEy... Ya my need is tat i need a super simple ebook(FREE) on C programming and covering advanced aspects of C like C - linked list , c-graphics and C-BITS... help! /************************************************** **************************************************/

Member Avatar for lionaneesh
-1
107
Member Avatar for Xufyan

I want the remainder of all the numbers inside the loop except the number which i assigned for variable [B]a[/B] for example , if i entered number [B]5[/B] for [B]a[/B], the loop is 5 4 3 2 1. i want my program to take remainder of all these values except …

Member Avatar for Xufyan
0
122
Member Avatar for Iam3R

Hi, Please some one clarify what does the below snippets mean and the compiler assumptions. which one is the correct one to use, what is the problem with others. [CODE] main() { } [/CODE] [CODE] void main() { } [/CODE] [CODE] int main() { } [/CODE] [CODE] int main() { …

Member Avatar for nezachem
0
222
Member Avatar for anjoz

hi i have a program here the 15 puzzle my problem is that im having a hard time makeing a random function the right way and also thinking of a way to make so that the program will not go out of the bounderies here my code [CODE]#include <stdio.h> void …

Member Avatar for anjoz
0
119
Member Avatar for TimCereja

Any idea why this loop repeats regardless of the input? What I have there does correctly assign the proper values to month, day, and year, but the input prompt is repeated no matter what is input. Obviously I would like it to repeat if an impossible day < 1 or …

Member Avatar for TimCereja
0
92
Member Avatar for churni

hi, i have a very simple problem with my program and just need a push in the right direction and will be much appreciative of your help. i have a bucket sort program which works fine. well i say fine, its fine when it is sorting the numbers initialised at …

Member Avatar for churni
0
175
Member Avatar for jephthah

i don't recommend atoi() or atol(). this does not handle invalid strings (non-integer strings) very well at all. for instance, if you try [code]value = atoi("CowAndChicken");[/code]the result will be zero (value = 0) and if you try [code]value = atoi("0");[/code]the result will also be zero (value = 0) strtol() avoids …

Member Avatar for Dave Sinkula
0
154
Member Avatar for W4W

Hiii all i hav i little problem i wanna insert a char into an another char and add some other chars .. :D For example : I have the char A = "HE"; i wanna have in B ="HELLO Everybody"; i was doing this in php : [CODE] $string=$A."LLO Everybody";[/CODE] …

Member Avatar for gerard4143
0
77
Member Avatar for gkaykck

[CODE] #include <stdio.h> #include <stdlib.h> int det(int); int minor(int); int main() { int mat[10][10],dim,a,b; printf("Please enter an integer for matrix dimensions(1-10):"); scanf("%d",&dim); for (a=0;a<=dim-1;a++) { for (b=0;b<=dim-1;b++) { mat[a][b]=rand()%10+1; printf(" %d",mat[a][b]); } printf("\n\n"); } printf("Determinant for the matrix is: %d",det(mat)); return 0; } int det(int mat[10][10]) { int a,b,temp,length; length=0; …

Member Avatar for gkaykck
0
142
Member Avatar for TimCereja

How is it that a string, or specifically a part of a string, can be isolated and put into its own integer variable? For example, a user is asked to input a date, such as 12/31/2000, which is saved as a string. How can the "12" the "31" and the …

Member Avatar for TimCereja
0
357
Member Avatar for Mahen
Member Avatar for peter_budo
0
276
Member Avatar for VernonDozier

Okay, I think I know the problem, but I don't know how to solve it. I want to write a binary file with raw bytes. Windows appears to interpret 10 as ASCII 10 and it does its thing where it interprets 10 as '\n' and decides to change that to …

Member Avatar for VernonDozier
1
133
Member Avatar for jaymeaux77

Hi there! I am working on a simple text based console application for a game of battleship. I am not really looking for a raw code just ideas on where to go next with my code. Some things i would like to put in it that I am flat out …

Member Avatar for jaymeaux77
0
4K
Member Avatar for mirness

please help me.. i dunno how to make my project in C/C++. it's about binary trees but we'll use names instead of numbers or single chars then the traversals.. PLEASE... thanks!

Member Avatar for xavier666
0
51
Member Avatar for retchedmonkey

Hello im working on a C program that counts the number of tabs, blanks and newlines. Here is my code: [CODE] #include <stdio.h> #define MAXLENGTH 500 /* This program accepts a string as input. * It should then count blanks, tabs and newlines. * It should print out the number …

Member Avatar for xavier666
3
430
Member Avatar for bexxy

Ive been trying to figure this out all day but have been unable to make as progress so I was wondering if anyone here could help me out. Im making a program that allows the user to add a name, update the current name list , remove a name from …

Member Avatar for Ancient Dragon
0
94
Member Avatar for bahr_alhalak
Member Avatar for jephthah
-2
123
Member Avatar for Xufyan

Can anyone explain whats wrong with this program why this is not working. [CODE] void main(void) { long a,b=1; clrscr (); printf ("Enter number to calculate its factorial:"); scanf ("%ld",&a); if (a=0,1) printf ("You entered 0 or 1"); else for (a=a;a>0;a--) { b*=a; } printf ("Answer is %ld",b); getch (); …

Member Avatar for Xufyan
0
1K

The End.