15,550 Topics

Member Avatar for
Member Avatar for hugo17

Hello, I'm working on a litle program. While working I stumbeled upon some problems. I would like to check if two Arrays are equal to each other. I tried this one, but it didn't work properly. [CODE] int control(int x1,int y1,int x2, int y2)//x1,y1 and x2,y2 -> coordinates of a …

Member Avatar for D33wakar
0
111
Member Avatar for minimi

Here is the instruction to the assignment: [url]http://dl.dropbox.com/u/43732846/Instruction.txt[/url] I think I got up to the part to initialize array and set length to 0 but I'm not sure how to do a for loop to print. I tried like strlen(month), printf(month[i]), etc, but none of them seems to work. And …

Member Avatar for hkdani
0
132
Member Avatar for Iphicles

Hi, is there anyone out there who has any little knowledge of how to got about getting ur program to read a .bmp file? Pls teach me or show me an example just about how to get ur program to read .bmp files Cheers Ming

Member Avatar for hellihdhs
0
216
Member Avatar for jen140

Hello. I've been doing a small application that will go (using only unsigned integer values) from 0 to 4026531840 and print them out. My code is next: [CODE]#include <stdio.h> #include <inttypes.h> int main(void){ uint64_t cnt; for(cnt=0;cnt<=4026531840;cnt++){ printf("%d\n",cnt); } } [/CODE] The only problem that i have is the last numbers …

Member Avatar for jen140
0
185
Member Avatar for Efficience

I have written a code for checking vfork in unix. But I am getting the ambiguous behavious. When I am using exit(0) in child process , output is fine i.e; output :- Before fork I am a child My name is parent child PID=> 23133 kValue => 2 ] But …

Member Avatar for Efficience
0
292
Member Avatar for DmytriE

I cannot spot the issue and neither can VS2010/ VS11 Developer preview edition. The code runs perfectly until allocating memory for the double pointer new_matrix. The only reason I cannot find the problem is because I've allocated space for 3 other pointers successfully. I believe I have the syntax correct …

Member Avatar for Narue
0
94
Member Avatar for dan1992

i have [CODE]program p1032; const n=10; num=4; var i:integer; a:array[1..n] of 1..n; procedure tipareste; var i:integer; begin for i:=1 to num do write(a[i],' '); writeln; end; procedure permuta(k:integer); var i,x:integer; begin if k=1 then tipareste else begin for i:=1 to k do begin x:=a[i];a[i]:=a[k];a[k]:=x; permuta(k-1); x:=a[i];a[i]:=a[k];a[k]:=x; end; end; end; begin …

Member Avatar for hkdani
0
100
Member Avatar for gourav1

[CODE]#include<stdio.h> #include<conio.h> int n,a[10]; void display(); void insert(int); int del(); int main() { int i,item=0,j; n=1; printf("enter the numbers:"); for(i=1;i<6;i++) scanf("%d",&a[i]); for(j=1;j<5;j++) { insert(a[j+1]); } } while(n>1) { item=del(); a[n+1]=item; } display(a); getch(); } void display() { int i; for(i=1;i<6;i++) { printf("%d ",a[i]); } } void insert(int item1) { int …

Member Avatar for gusano79
0
111
Member Avatar for gourav1

my problem is highly conceptual problem. when i write: node *new1=malloc(sizeof(node)); it works properly. but when i write : node *new1=malloc(sizeof(node*)); it starts giving errors. // node is the structure having a integer and pointer to itself.

Member Avatar for gourav1
0
157
Member Avatar for nered

Hi, To explain once my app is added to windows path you can simply call it from CMD and you know how when you run a console it opens up a default folder and you can navigate to a new on by using cd .. and cd path command. I …

Member Avatar for nered
0
196
Member Avatar for hegde1997

hello there it my first thread on this forum. well i need some help. See i am thinking abt making my own video player not for any project kinda thing but for my wish and knowledge. I am good in C and java, with help of C i learnt c++ …

Member Avatar for hkdani
0
275
Member Avatar for karthi_selva

Hi, i am new to pthread area. i like to pass the dynamic argument into the thread function. example [CODE]function(void *value) { printf("%s",(char *)value); }[/CODE] here i like to pass dynamic argument when thread is running. so is it possible in pthread? please share your ideas...

Member Avatar for gerard4143
0
126
Member Avatar for tomtetlaw

How can I check if my program was launched from the command line or from windows explorer?

Member Avatar for tomtetlaw
0
147
Member Avatar for infantheartlyje

Here is my code . Switch statement doesn't working in this. why? [CODE] int callprocess(FILE *File) { int Rec = 0; // record number char tcode[3]; //char buffer[30]; struct timeval b,e; long int tms,tme; do { printf("\nMenu :Init, Dummy, Add or Quit ( I, U, A or Q) : "); …

Member Avatar for infantheartlyje
0
182
Member Avatar for ziyadgodil

how convert this code into structure in c plz help me [CODE]class car { private: int x1,y1,x2,y2,col,col2,col3; public: car():x1(200),y1(300),x2(270),y2(200),col(4) {} car(int a,int b,int c,int d,int e,int f,int g):x1(a),y1(b),x2(c),y2(d),col(e),col2(f),col3(g) {} }[/CODE]

0
47
Member Avatar for Se7Olutionyg

I want to readfile and merge them all to the arraytotal array , It works fine for individual file, don't know why, it printed out some weird character for the final Thanks [CODE]#include <stdio.h> #include <string.h> #include <stdio.h> #include <stdlib.h> using namespace std; #include <iostream> void fnSortHeap(char array[], int arr_ubound); …

Member Avatar for MonsieurPointer
0
155
Member Avatar for Se7Olutionyg

I want to open different file names, at first it work well on couple files, but it has to be in order, what if i open random file like fall01, fall05,srping09 etc Thanks [CODE]#include <stdio.h> #include <string.h> #include <stdio.h> #include <stdlib.h> using namespace std; #include <iostream> int main() { FILE …

Member Avatar for D33wakar
0
188
Member Avatar for glut

Hey, I need to make a function that returns an array. How would I do so? And how would I make a variable that gets all the values in that function? Thanks, you guys :)

Member Avatar for Moschops
0
217
Member Avatar for neeraj goswami

//take mob.no ,name ,bill amt #include<stdio.h> #include<conio.h> #include<string.h> struct mob1 { char mob[10]; char name[10]; float bill; }; int main() { struct mob1 a[30]={{'\0'},{'\0'},0.0}; void accept(struct mob1 a[30],int n); void display(struct mob1 a[30],int n); int append(struct mob1 a[30],int n); void selmob(struct mob1 a[30],int n); void srch(struct mob1 a[30],char [],int,int); void …

0
64
Member Avatar for ajayb

How to find size of a semaphore object in windows? I tried using sizeof() but we cannot give name of the sempahore object as an argument to sizeof. It has to be the handle. sizeof(HANDLE) gives us the size of handle and not semaphore.

Member Avatar for Ancient Dragon
0
108
Member Avatar for ragnacrap

This is what my professor provided me in his own words. "Write a program that copies the contents of a text file specified by the user and copies it to another text file "copy.txt". No line in the file is expected to be longer than 256 characters." Here is part …

Member Avatar for D33wakar
0
245
Member Avatar for Yashu589

Hey I am using SHLoadImageFile API ,but i am facing prob in loading images (jpeg) of bigger size. Can anyone help me to solve this?

Member Avatar for Yashu589
0
164
Member Avatar for mameemonster

i'm new to this c programming. all i wanna do is to make the user to enter the number of student, then input the name and address of the student. later i want it to print the name and the address. the program crashes after i input all the name …

Member Avatar for WaltP
2
436
Member Avatar for mameemonster

hey, i wanna know what is your idea on making program using C. the program must consist all of the basic until array. any great idea? just learning function but still not understand about it. thank you :)

Member Avatar for Ancient Dragon
0
70
Member Avatar for dev90

I am not getting all numbers but only last number while readind data from file. And it has to be done with fscanf function.[code]/* input n nunbers fom user and write it in the file.find it's sum and write the ans. in another file */ #include <stdio.h> #include <conio.h> void …

Member Avatar for WaltP
0
137
Member Avatar for coder_10

Hi, How can I add the values of an array to a char variable? Without using "strcat" btw. [CODE]char table[5],message; t[0] = "h"; t[1] = "e"; t[2] = "l"; t[3] = "l"; t[4] = "o";[/CODE] Than end up with "message = "hello""? Thanks.

Member Avatar for hkdani
0
196
Member Avatar for maybnxtseasn

[code]int Add(int nX, int nY) { return nX + nY; } int main() { int (*pFcn)(int, int) = Add; int (*pFcn)(int, int) = &Add; cout << pFcn(5, 3) << endl; // add 5 + 3 return 0; } [/code] my question is are both of these lines equivalent? or is …

Member Avatar for Narue
0
77
Member Avatar for jimbakl

when it was all right suddenly when i try to compile and run a code display me this problem [QUOTE][IMG]http://img191.imageshack.us/img191/2909/captureyty.png[/IMG][/QUOTE] because i used to use DevC i never find this kind of problem, i search in to the MS visual folder in my pc but i dont find anything. DId …

Member Avatar for Ancient Dragon
0
109
Member Avatar for reuben12

I have a bcp output file from sybase that i need to parse using 'c' and write to a new file. A sample line from bcp o/p file is below 9890000501:74667:0:6::2:0000:0:6:0:5:0:0:0:0:0:0:0:::9890000501:1:1:0::::::::0:0:3::::::::::\202^B:\202^B^D:0:0 :1:0:0:0:0:0:0:0:0:0::::0:0:0:::::::::0::0:0:0:0: The file has ":" has the delimitor. I need to create a new file with a single line …

Member Avatar for maaroufi
1
2K
Member Avatar for DmytriE

I am having the hardest time figuring out how to pass a pointer as an argument. All of the examples I have come across are using predefined array sizes while my array is dynamic. The following code is a simple representation of what I am trying to do in a …

Member Avatar for DmytriE
0
119

The End.