19,876 Topics

Member Avatar for
Member Avatar for bharanidharanit

Hello I am having 3 files. a file contains text as aaaa,bbbb,cccc b file contains text as 1111,2222,3333 so i want to read these 2 files and write to new file as aaaa1111,bbbb2222,cccc3333. Can i able to do this?

Member Avatar for Ancient Dragon
0
128
Member Avatar for bharanidharanit

Hello, I want to read a text file in C and the output file must be created and want to reverse the data in tat output file created. So i used the below coding but not reversing the data in the output file created. eg: input file contains this data …

Member Avatar for Dave Sinkula
0
358
Member Avatar for kostasxx

Hi I use Dev - C++ and i d like to ask you cause i dont seem to figure that out, how can i store a 12 digit number? For example lets say this is the number 930342900243 How can i write a program that would print that number using …

Member Avatar for Dave Sinkula
0
132
Member Avatar for MrNoob

okay i understand all bitwise operators but in the chapter of k&r at bitwise operators i m really lost at there question i have no idea how to do them Exercise 2-6. Write a function setbits(x,p,n,y) that returns x with the n bits that begin at position p set to …

Member Avatar for Tom Gunn
0
378
Member Avatar for girl_pt

I want to read the contents of a .txt file and the contents, for example, are: 1;london;7000;2000;3000;5000; etc i want to read them to a variable linked by adjacency lists I need to know how to do this for a paper work and any help is welcome. thx in advance... …

Member Avatar for Dave Sinkula
0
105
Member Avatar for floodemo

what does this code mean/do? Rectangle[] rects = new Rectangle[] { new Rectangle(8,8,119,86), new Rectangle(127,8,119,86), new Rectangle(246,8,121,86), new Rectangle(8,94,119,90), new Rectangle(127,94,119,90), new Rectangle(246,94,121,90), new Rectangle(8,184,119,88), new Rectangle(127,184,119,88), new Rectangle(246,184,121,88) }; formGfx.DrawRectangles(pen, rects);

Member Avatar for ddanbe
0
86
Member Avatar for Ruan RT

Hi All I am new to C# language and would like to know where I can get my hands on some good examples of C# in Revit. I am not a genies in programming so I will possibly need a book for C# programming for dummies :-) Any information would …

Member Avatar for Ramy Mahrous
0
110
Member Avatar for blackrobe

Hey there, I have a simple question: How can I read three characters by three characters from a string (character array) in C? Thanks for your help.

Member Avatar for s_sridhar
0
160
Member Avatar for sijithjp

hi plz help. Trying since 1 week. acwl1 line we james line rx sijith fff xw nisha nnn w /sijith line r /Arjun line w vineeth line r acls2 faculty x arrr line2 w Rahul line3 wx Arjun line1 m /Tom line wr ac01l2 lineN w aclM1 line1 rw Ram …

Member Avatar for WaltP
0
86
Member Avatar for athlon32

This is my code that I'm using: [code=C]void create_project_go() { FILE *fp; FILE *fopen("/usr/lib/htmlexamples/default.html", "r"); };[/code] and i get this error: [code]/home/miguel/Documents/packing/create_project.c||In function ‘create_project_go’:| /home/miguel/Documents/packing/create_project.c|40|error: expected declaration specifiers or ‘...’ before string constant| /home/miguel/Documents/packing/create_project.c|40|error: expected declaration specifiers or ‘...’ before string constant| /home/miguel/Documents/packing/create_project.c|39|warning: unused variable ‘fp’| /home/miguel/Documents/packing/create_project.c||In function ‘get_project_info’:| /home/miguel/Documents/packing/create_project.c|46|warning: …

Member Avatar for WaltP
0
230
Member Avatar for paroshm

Hi Folks I need to modify a .txt file using a C program. The file contains name and phone number of my friends like below: Mark 07915588623 Phill 07542535698 Claire 07825698745 ... ... . . ... If one of my friends phone number is changed (i.e. Claire 07985413791), how could …

Member Avatar for Narue
0
112
Member Avatar for jusmeehh

Write a program to compute the aritmetic mean (average), median, and mode for up to 50 test scores. The data are contained in a text file. The program will also print a histogram of the scores. The program should start with a function to read the data file and fill …

Member Avatar for jusmeehh
0
177
Member Avatar for JurieBurie

PDF virtual printer in c# Hi All I have a small project that someone asked me to do for them and am struggeling quite a lot to get started. Could someone please steer me in the right direction. Here are the requirements: When you are in app such as word/excel, …

0
53
Member Avatar for seemant_sun

i have a thorough knowledge C and a little bit of practice of C but i wanted to be a good C programer can anybody tell me how i can do it are ther any good books which can provide me good practice of C

Member Avatar for jephthah
1
116
Member Avatar for hypernova

[U]see the following code-[/U] [code] #include<stdio.h> #include<conio.h> struct emp { int age; char name[6]; }*e; void main() { printf("%u\n",&(e->age)); printf("%u\n",(&(e->age)+0)); printf("%u\n",(&(e->age)+1)); printf("%u\n",(&(e->age)+2)); printf("%u\n\n\n",(&(e->age)+3)); printf("%u\n",(&(e->name)+0)); printf("%u\n",(&(e->name)+1)); printf("%u\n",(&(e->name)+2)); printf("%u\n",(&(e->name)+3)); printf("%u\n",(&(e->name)+4)); printf("%u\n",(&(e->name)+5)); printf("%u\n\n\n",(&(e->name)+6)); printf("%u\n",((e->name)+0)); printf("%u\n",((e->name)+1)); printf("%u\n",((e->name)+2)); printf("%u\n",((e->name)+3)); printf("%u\n",((e->name)+4)); printf("%u\n",((e->name)+5)); printf("%u\n\n\n",((e->name)+6)); } [/code] OUTPUT------------------------------- 0 0 4 8 12 4 10 16 22 28 …

Member Avatar for s_sridhar
0
125
Member Avatar for realdraickin

Hi, everyone and first off thank you for this great community! So, here is my question about my code: [CODE] #include <pthread.h> #include <stdio.h> int data; // global variable void *thread_function1(void *arg) { int temp,i,j; printf("I'm threadf1\n"); for (i=1;i<=20;i++) { data++; temp=data; temp+=3; j=0; while ( (j++)<1000000 ); data=temp; } …

1
43
Member Avatar for andy126

Hi, I'm trying to read data from a text file and store it into an array. I know this issue has been dealt with earlier, but none of those threads seem to be helpful in this case. Sorry in advance if I missed a relevant post. The data in the …

Member Avatar for jephthah
0
163
Member Avatar for tkansara

hello guys... my problem is that i cannot seem to save the value of ptr pointer.... every time i reference it the value seems to reset. after the initializatin it should have 2w's and 2b's in it.. but when i try and print it. it comes as empty... the entry …

Member Avatar for csurfer
1
93
Member Avatar for atman

Hello., I'm reading about anonymus structs and have problems understanding what is the privilege to have one. could anyone demonstrate an example of both anonymus and regular struct. I see that anonymus struct has a name after the the } and before semicolon. Any help would be greatly appreciated. Thank …

Member Avatar for Ancient Dragon
0
191
Member Avatar for NetGD

Hello, I am am trying to get a ListView to populate based on an xml file. to acheive this I would like to use the DataTable. this is my XML file: [CODE]<?xml version="1.0"?> <main> <person> <id>1</id> <name><first>Joe</first><last>Blow</last></name> </person> </main>[/CODE] And the C# that I am using to read it: [CODE]public …

Member Avatar for kvprajapati
0
1K
Member Avatar for asifjavaid

Hi all, I working in VC++. I have a void pointer. I am assigning a memory block to it using malloc(). void* buf_ptr = NULL; buf_ptr = malloc(1428480); I am filling this buffer using fread(). and I want to index this buffer (buf_ptr) to acces its data. How can I …

Member Avatar for asifjavaid
0
2K
Member Avatar for Cman2020

[code] Hello guys i need help in doing "Saving text in TextBox" let say you want you have someone info already in the textbox already and you want to add in the existing info this is what i have so far txtOutput.Text = txtNotesEntry.Text; i know this just copy whatever …

Member Avatar for Cman2020
0
385
Member Avatar for thebluestar

I had 1 exercise: read data form file then add into TREE. I read data in the file into an array, then add array into TREE, here is my solution but it does not work properly I know that data in array seq[] will be erased after ReadFile() function but …

Member Avatar for jephthah
0
106
Member Avatar for MrNoob

Hello i m reading chapter in K&R about bit operation whish totally confuses me i understand what all operators does but i dont understand the code itself [code] unsigned getbits(unsigned x, int p, int n) { return (x >> (p+1-n)) & ~(~0 << n); } [/code] it will right shift …

Member Avatar for jephthah
0
114
Member Avatar for beaute

Hello, I'm trying to read dictionary words from a file and store the output in a struct element of type unsigned char *. I keep getting a bunch of memory related errors and segmentation faults which Im sure are totally related to me trying to access something that's not really …

Member Avatar for csurfer
0
144
Member Avatar for MrNoob

i dunno im sure this output the good result i dont understand why it got not the output that i want [code] #include <stdio.h> void Squeeze2(char *str,char *save) { int i,x; int buffer=0;//used to save stuff for( i=0 , x=0 ; str[i]!=0 && save[x]!=0 ; i++, x++ ) { if( …

Member Avatar for csurfer
0
99
Member Avatar for revenge2

hey there, i need some help in understanding pointers. this is an example from school but i cant quite figure i out. i know the basis of pointers but could someone give me some more info. [CODE] #include <stdio.h> #include <string.h> int string_len(char *s); int main() { char s[80]; strcpy(s,"Hello"); …

Member Avatar for csurfer
0
109
Member Avatar for MrNoob

i m trying to code htoi function in chapter 2.3 for K&R but problem i dunno where to start should i first read all string then after that change each character to its decimal and then add them ? or any better ideas?

Member Avatar for Narue
0
574
Member Avatar for vikasnahar

[code=c] #include<iostream> using namespace std; int fact (int num); int main () { cout<<"Enter a number"<<endl; int number; cin>>number; cout<<"Displaying number: "<<number<<endl; cout<<"Calculating Factorial for the number"<<endl; int fact; fact = fact(number); return 0; } int fact (int num) { if(num==1) { return num; } else { return num * …

Member Avatar for seemant_sun
-1
107
Member Avatar for seemant_sun

"I am a boy\r\n" if this string is readed through using fgets in an array what will get readed

Member Avatar for seemant_sun
0
484
Member Avatar for animefun2

I have an array of integer of size 20 and there values range from 0-9 and i want atleast the value 0 placed in one location in the array once. how can i control rand() to be able to do that? cause there a possibility 1/10 will randomily generate 0 …

Member Avatar for seemant_sun
0
196
Member Avatar for atman

Hello., Have a question about array being set from function argument. I wrote this little program, and want to know why cant i set an array size from the function argument. Any help would be greatly appreciated. [CODE] int money(int deposit, ...){ int i, sum = 0, nextvar; // myArr[deposit]; …

Member Avatar for siddhant3s
0
123
Member Avatar for seemant_sun

write a program to find size of a file without traversing it character by character? will anybody tell me the logic hw to approach it is there any trick involved

Member Avatar for Ancient Dragon
0
120
Member Avatar for seemant_sun
Member Avatar for Ancient Dragon
0
138
Member Avatar for nonon

Hello guys! I just started learning c#.net. I able to make a simple report using crystal report. Now, my problem is I can't include data which comes from the textfields in the forms of my application. ex. I have value "alpe" in my textbox. and I want to include this …

Member Avatar for pupilstuff
0
132
Member Avatar for N3oblaster

Hi, Im new to C# and need help with my program that im writing i need to let it read an XML in the first window and when i press add program a second window opens (both windows i have) i want it to write the XML so something like …

Member Avatar for N3oblaster
0
236
Member Avatar for greg_mystikal

Hi, I am looking to create a C# application that when ran remains inactive (and hidden) untill I hang the mouse over something.. such as the 'My Computer' icon on my desktop (it will then display a message). Is this possible? If so, can anyone point me in the right …

Member Avatar for Diamonddrake
0
93
Member Avatar for chiroc

I am writing a simple program for managing the final grades of students. The program first read original data from a file called "final.txt", and create a linked list to store the imfornation in memory. The format of the orginal data is "Class_Character Seat_number Computer_grades Laboratory_grades". There is only data …

Member Avatar for csurfer
0
664
Member Avatar for tintincute

Hi I'm designing a code where one can guess the Magic Number. In my code I have this part here where I declared the randomNumber after the class Form1. (the green mark below). Can somebody tell me what's the name of this part here? Is it static variable? And what …

Member Avatar for kvprajapati
0
79
Member Avatar for rabbitwat2

Hello Everybody, I am working on a project and i want to compose one main string out of several substrings in C. for example: I have 3 variables: Float Vx=1,66 Float Vy=1.55 Float Vz=2.3 My first step is to convert them to character arrays usin snprintf. Then i want to …

Member Avatar for rabbitwat2
0
158
Member Avatar for grandalf62

This may be be a silly question, but its baffling me. If I set up a receive interrupt, process the data and clear the flag. All works well. The problem is I need to use printf. I realize that this will of course also generate an interrupt, I handle this …

Member Avatar for grandalf62
0
162
Member Avatar for purpleCRAYON

This is the code i'm using: [code] List<Process> processes = Process.GetProcesses().ToList(); processes.ForEach(x => MessageBox.Show(x.ProcessName + ".exe"));[/code] For some reason, it is looping through it, I just want it to go through the processes once. Anybody got any help?

Member Avatar for sknake
0
96
Member Avatar for suthab

Hi All, I am trying to read a file line by line. If a line contains the following character ':' then that line will be parsed word by word and put in a list. I am trying to do that but the head pointer is changed when we go to …

Member Avatar for kvprajapati
0
123
Member Avatar for daino

When initializing a constant data member in a given class with a constructor, does the act of initializing that constant data member (providing it with a value) actually stop you from assigning it the value you wanted to give it later on in the program? My understanding is that a …

Member Avatar for dwks
0
165
Member Avatar for xtremebeauty

can u please tell me that if in c# windowsapplication i want to insert picture which code i have to write?????????

Member Avatar for serkan sendur
0
197
Member Avatar for horiya

hi! i need help with my code...i dont have any syntax errorrs but when i run it it doensnt run!! i dont kno what to do!! plss i really need help!!! i have to write code tht uses array to store student information and calculate the average, letter grade. i …

Member Avatar for tux4life
0
133
Member Avatar for cooldev

Below is my prime generator, it works fine only thing it gives me 1 more prime than i want eg., if num=40, i need primes uptill 40 but it gives me 41 also...i want it to stop at 37. It works fine with 90. sample run ======== Enter the number:40 …

Member Avatar for cooldev
0
97
Member Avatar for protjaart

hi i am truly just a student at this time soon to be the worlds best programmer there is just this one hickup with my studies i am trying to learn the c++ visual studio 2008 as part of my current course i am taking and every thing went well …

Member Avatar for protjaart
0
124
Member Avatar for seemant_sun
Member Avatar for ArkM
0
77
Member Avatar for Pavan_

Hello friends, i have some doubt and hope i will get an satisfactory answer from here. 1) Can memory addresses be negative........i have initialized an array and check the address of element and found it negative...so i want to know can it be negative and if yes then how addresses …

Member Avatar for ArkM
0
148

The End.