19,876 Topics

Member Avatar for
Member Avatar for Transworld

I need to make a program for school and I have no idea how to make it. I am supposed to do: [QUOTE]A right triangle can have sides that are all integers. A set of three integer values for the sides of a right triangle is called a Pythagorean triple. …

Member Avatar for Transworld
1
7K
Member Avatar for lin-da

I had such code to copy three 2D arraya around by using pointers like below, but it seems all three pointers are pointing to the same memory address. How can I get it correctly? float **U_past, **U_future, **V_past, **V_future, **U_pp, **V_pp; In construct : U_past = new float*[a]; //a=100 U_future …

Member Avatar for Dave Sinkula
1
99
Member Avatar for johnny2k

I need help in creating a program in C which tells whether the user pressed the Insert, Caps, Numlock, Alt, Ctrol, Left Shift and Right Shift... I would appreciate any help.

Member Avatar for johnny2k
1
133
Member Avatar for danny_froud

Hi, I confess I am stuck. Can anyone see a problem with the following code, to be run under Linux, compiled with g++ ? #include <stdio.h> #include <sys/types.h> #include <sys/times.h> int main () { struct tms tmp; times(&tmp); printf("stime %d \n",tmp.tms_stime); printf("utime %d \n",tmp.tms_utime); return(0); } The code compiles and …

Member Avatar for danny_froud
0
126
Member Avatar for cford
Member Avatar for alc6379
1
115
Member Avatar for littletimmy

I have a problem which is outlined below. I get an unhelpful memory dump. I have 2 questions. Why doesn't the memory dump contain the line number as it should. And why am I geting memory dumps without ever using new or malloc or any such functions. This is being …

1
139
Member Avatar for big146

Im thinking of writing( or attempting to write ) a routing program for delivery trucks. I was wondering what the best way to go about this would be? I would like to use zipcodes, but I would also need that lattitude and longitude to be able route them in some …

Member Avatar for Chainsaw
0
96
Member Avatar for damionspencer

:mad: :mad: :( :( I've been trying to write this program that is suppose to read in a text file manipulate in and give the following out put infact here is the question Implement a program that uses a form-letter template to generate form letters. Your program should read in …

Member Avatar for Dave Sinkula
2
181
Member Avatar for Sukhbir

Can someone explain me how these character or escape sequence are treated while finding string size(through sizeof() operator) \0 \n \a \1 \2 for example char str[]="\1abc\0\0" pls explain me in detailed

Member Avatar for Dave Sinkula
0
144
Member Avatar for Guanajuato

Hi, I´m using Miracle C Workbench to create an administration project. I used several files to save my project in parts, one for main, one for sales, etc. In the main file I used "include" to join all files, but when I compile it, it shows "SOURCE FILE TOO BIG" …

0
102
Member Avatar for Mannix16

Hey guys, Quick question about strings. Check out this piece of code: #define compare_them(x,y) ((x) > (y) ? (x) : (y)) main() { cout<<compare_them('A','B')<<'\n'; cout<<compare_them("X","Y")<<'\n'; return 0; } The output is B, X. Obviously B has a higher ASCII value than A so it is larger. However when it comes …

0
84
Member Avatar for Asif_NSU

I can read which key is pressed using getch(). For example i can read whether left arrow is pressed or not. But i want know whether both left arrow and up arrow is pressed at the same time or not-- I want to move an object diagonally across the screen …

Member Avatar for gusano79
0
184
Member Avatar for blackspider

Okay, so I feel dumb.. I'm trying to ./configure something, but it comes up with an error saying that I don't have an acceptable C Compiler... Fair 'nuff... The question is, where do I get one, how do I install it. I've been scouring the web now for two and …

Member Avatar for DMR
0
106
Member Avatar for BountyX

I have a list view report style. Im trying to sort by click on a header. For some reason it does nothing. This Peice of code is invoked when the column is clicked. [CODE] if (pnm->hdr.code == LVN_COLUMNCLICK) { //DialogBoxParam(ghInstance, MAKEINTRESOURCE(IDD_SORT), // NULL, (DLGPROC)SortDlgProc, 0); if(nSortDir[pnm->iSubItem]) nSortDir[pnm->iSubItem] = false; else …

Member Avatar for BountyX
0
963
Member Avatar for DietFist

Does anyone know of any good libraries that will handle establishing a HTTPS connection? I really don't have the time to get in and learn how to send HTTP packets let alone worry about encryption, so if someone could suggest something that would be great. I'm also looking to set …

Member Avatar for FireNet
0
109
Member Avatar for alexmejia92

I have my program until that point and I can't finished, please someone helps me to finish my homework #include <stdio.h> int main () { int x, y; x = 6; y = 2*x*x*x+5;

Member Avatar for Dave Sinkula
1
84
Member Avatar for alexmejia92

I need to write a C program `(a) declare two integer variables , and y` `(b) lex x = 6` `(c) find y value use the following algebraic fromula: y=2*x*x*x+5 ` and I only have until these part #include <stdio.h> int main () { int x, y; x = 6; …

Member Avatar for Killer_Typo
0
115
Member Avatar for alexmejia92

I really need help I'm student from college and I need to write a C program a) declare two integer variables x and y b) let x = 6 c) find y value use the following algebraic formula y=2x (third power) + 5

Member Avatar for Chainsaw
1
329
Member Avatar for Mr.PinkBunny

[COLOR=Magenta]Everytime I open up a project that I ever made, and try to build it, it keeps complieing all of these other files that i've never seen before, and it gives me about 300 errors. I don't know what to do. I can't even use it, everthing has these files. …

Member Avatar for Chainsaw
1
99
Member Avatar for fromchina

typedef struct _mib_info{ int mib_vartype; Bool mib_writable; Bool mib_varleaf; [COLOR=DarkOrange] int (*mib_func)( struct _mib_info *, char );//pointer[/COLOR] char *mib_func_param; struct _mib_info *mib_info_next; }mib_info; mib_info mib[] = { { 2, FALSE, NLEAF, [COLOR=DarkOrange]snleaf[/COLOR], 0, 0}, // } ; /*-------------------------------------------- There is a mistake in GetID():indirect call: parameters do not fit within …

Member Avatar for Chainsaw
0
116
Member Avatar for Brent_Ritterbec

I wrote a program that allows me to send data to a file if I wanted to do that by redirecting the data stream. The only problem is that I can't figure out how to make that work from the DOS prompt. Here is the program: /* echo_eof.c -- repeats …

Member Avatar for Chainsaw
0
160
Member Avatar for Mahen

Hi everyone, i wanted my program to create another small program, but it stopped at `"\x00"`, why and what can i do. Thnaks #include <stdio.h> int main() { FILE *out; out = fopen("c:\\cpy.exe", "wb"); fprintf(out, "\xCD\x21\x00\xCD\x21"); fclose(out); return 0; }

Member Avatar for Chainsaw
0
175
Member Avatar for Sukhbir
Member Avatar for XianBin
0
139
Member Avatar for Mahen

hi everyone, hope u r all feeling fine :mrgreen: this is my program: #include <stdio.h> int main() { char pass[12]; printf("Enter Password: "); gets(pass); if (pass == "neo") { printf ("ini"); } else printf("Wrong"); return 0 ; } when i enter "neo" as password, it does the "wrong" thing :( …

Member Avatar for Dave Sinkula
0
177
Member Avatar for chound

I want to know where I can find tutorial on controlling the hardware of my pc using C :o

0
61
Member Avatar for kicha

how can i evaluate an expression using tree example: 2*6+5/10 actually i have doubt in inserting in a tree.

Member Avatar for Chainsaw
0
117
Member Avatar for Sukhbir

Consider the following programme void main() { char str[]="\12345s\n"; printf("%d",sizeof(str)); } Output is :6 can someone explain me why.And is sizeof contain null value while gigving the size of any string.

Member Avatar for Dave Sinkula
0
137
Member Avatar for apurva agarwal

winding rule is used to find the points either interior or exterior to ploygon so , but the problem lies that when the point lies in the same line we have to apply some different concept that i am not able get it sp pleas explain it.

Member Avatar for nallahp
0
134
Member Avatar for shabna

sir,please correct the errors in this program and also write the algorithm in this program and give me an introduction to this program.Pls send the error free program,algorithm & introduction before 03/09/2004.thank you #include<iostream> #include<iomanip> #include<stdio> #include<cstdlib> #include<cctype> #include<fstream> using namespace std; const int maxchrs=50; const int items=3; const short …

Member Avatar for Dani
0
133
Member Avatar for Brent_Ritterbec

Hello, I started learning C about 2 days ago, and now I have come to a problem that I can't figure out why I am getting the result I am getting. I bought a book, and I have proceeded quickly through it until now. The problem I was given was …

Member Avatar for Brent_Ritterbec
0
329
Member Avatar for apurva agarwal

insert a node in circular link list without traversing it. :?: you have to insert the node at any place "without traversing it help me out!!! in this

Member Avatar for Chainsaw
2
163
Member Avatar for wild_potatos

Hi guys / girls i am new in this forum and i hope you could help me in this problem. i programmed a link list which stores some information one of them is strings and i entered them using the function gets(); instead of scanf(); to enable the program to …

Member Avatar for Dave Sinkula
0
229
Member Avatar for chound

How do I create a function with variable parameters. Will "functionname(float a, ...);" work? If it does how do I use the variables. Eg. [CODE]void f1(int i, ...); void main() { int a, b,c; cout<<"Enter 3 values"; cin>>a>>b>>c; f1(a, b, c); } void fi() { //How do I access the …

Member Avatar for Chainsaw
0
152
Member Avatar for sonix

anyone remembers the syntax of reading a file into C and subsequently printing it out? for eg. i have the file 'matrix.txt' the contents inside the file is as follows: <matrix> rows = 2; cols = 2; 1 2 2 4 </matrix> how do i read it into my C …

Member Avatar for Dave Sinkula
0
463
Member Avatar for RobinA

Hi im programming a program thats going to count how how many doussins,grosses and pieces. there are if you enter a number. (just so u know ive started programming 1 week ago and havent programed alot cause school started) ok heres my problem: when i enter 502 pieces it says …

Member Avatar for RobinA
0
97
Member Avatar for ArmedCoder

Hi, im just learning about multithreading for a program i am writing that ne eds to read from multiple camreas attached to the computer at the same time. I know how to create threads and pass around info, and i know a bit about mu texes but this is not …

Member Avatar for ArmedCoder
0
199
Member Avatar for jatin

hey guys..... i need 2 write this program which picks as and when a new message is written into the syslog file(syslog is a system file in unix) the trouble is ther r hundred's of messeges written into syslog file. I was experimenting with End Of File and pointerts but …

0
98
Member Avatar for RITZY_G

can u please xplain' wat this error means: [COLOR=Sienna][FONT=Comic Sans MS][U][I][B][SIZE=2]Linking... file_name.obj : error LNK2001: unresolved external symbol "int * resultarray" (?resultarray@@3PAHA) Debug/file_name.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe.[/SIZE][/B][/I][/U][/FONT][/COLOR]

Member Avatar for Dave Sinkula
0
148
Member Avatar for let us c

hi i want to get following output. 1 2 2 2 3 3 3 3 3 4 4 4 4 4 4 4 and so on in 1st row one 1 in 2nd three 2 in 3rd five 3 in 4rt seven 4 in 5th nine 5 (all odd outputs)

Member Avatar for let us c
0
96
Member Avatar for Sukhbir

consider the programme void main() { unsigned i=1; signed j=-1; if(i<j) printf("less"); } output is: less why can someone explain me

Member Avatar for Dave Sinkula
0
132
Member Avatar for Mahen

hi everyone, I belive in daniweb and post my question so that everyone can help me. CAN anyone provide me with a link to a web that has a tutorial about: 1. Socket programming in win32 2. Porting UNIX C's to WIN32 THANKS :p

Member Avatar for FireNet
0
118
Member Avatar for Mahen

Hi everyone, First of all thank you very much for all the help that you have been providing me. Unfortunately, i am with another bug. This time, i am havinh problems linking OBJ files that uses the following: #include <stdio.h> #include <winsock2.h> #pragma comment(lib, "ws2_32") When i link them, i …

Member Avatar for Dave Sinkula
0
249
Member Avatar for kalinga

i need some help in understanding to write the following programs.please describe how you think of doing it.. 1) * ** *** **** ***** ****** ******* 2)******* ****** ***** **** *** ** * thank you.....

Member Avatar for rishiraj_bayerd
1
131
Member Avatar for kalinga

i dont understand about how to use the reference and value parameters in a program. I also need to know how to pass an array to a function.give me the reasons with examples .. thank you kalinga....

Member Avatar for Dave Sinkula
0
220
Member Avatar for Sukhbir

#include<iostream.h> void main() { cout<<"hello"; } //IF WE COMPILE THIS PROGRAMME IT WILL NOT PRINT HELLO ON U'R SCREEN.TELL ME WHY & TELL ME PROCEDURE HOW IT PRINT USING COUT IN VC++

Member Avatar for stg110
0
280
Member Avatar for smithag261

I'm new to C programming. I could not understand how to write the following programs. 1. Any year is input through keyboard. Write aprogram to determine whether it is a leap year or not.

Member Avatar for let us c
0
159
Member Avatar for Mahen

Hi everyone, First of all thank you very much for all the help that you have been providing me. Unfortunately, i am hist with another bug. This time, i am havinh problems linking OBJ files that uses the following: #include <stdio.h> #include <winsock2.h> #pragma comment(lib, "ws2_32") When i link them, …

0
56
Member Avatar for Ghost

Can anybody help me with some or all of these problems? Problem 1: Write the definition of a function minMax that has five parametersª. The first three parametersª are integersª. The last two are set by the function to the largest and smallest of the valuesª of the first three …

Member Avatar for WhataNerd
0
228
Member Avatar for smithag261

I want to know how to write a program to fill the entire screen with a smiling face. The smiling face has an ascii value 1.

Member Avatar for FireNet
0
73
Member Avatar for Ghost

I need help solving two macro questions in C++. They are: Define a macro PANIC that expands to code that uses cout

Member Avatar for Ghost
0
1K

The End.