19,876 Topics

Member Avatar for
Member Avatar for hariza

Hi Guys , If I have a file compouse by words one per line how can I get all the words to put them together and have them separated only by one space. Also how can I make sure I'm extracting only words and not numbers or special character. I …

Member Avatar for Ancient Dragon
0
87
Member Avatar for jan1024188

sory im complete newbie i have [code]include <stdio.h> int main() { int x; for(x=1; x < 10; x++) { printf("%d\n second ", a); } return 0; }[/code] [code]for.c:1: error: syntax error before ‘<’ token [/code]

Member Avatar for jan1024188
0
90
Member Avatar for jan1024188

ive got this [CODE]#include <stdio.h> #include <unistd.h> int main() { int a; int b; a = 3; b = 30; until (a == b) printf("%d\n second ", a); a++; usleep ( 990000 ); printf("\n\n hvala ker usate ta pgr \n\n"); return 0; } [/CODE] but i got this error when …

Member Avatar for jan1024188
0
79
Member Avatar for jan1024188

i have [CODE]#include <stdio.h> int main() { int a; int b; a = 3; b = 30; while (a < b) { printf("%d\n crap .....", a); a = a + 1; } return 0; } [/CODE] i got output [QUOTE]crap .....4 crap .....5 crap .....6 crap .....7 crap .....8 crap …

Member Avatar for ~s.o.s~
0
119
Member Avatar for suhasrao

[B]Hello everyone.....[/B] [B]I wanted to know how can we send and receive data from usb port[/B] [B]using c programming[/B]......

Member Avatar for Salem
0
38
Member Avatar for rowly

Hi, can any one tell me what size_t_count does, i couldnt get it . thanks guyz ! [code] fwrite([COLOR=#0000ff]const[/COLOR] [COLOR=#0000ff]void[/COLOR]*_str,size_t_Size,size_t_count,file *_File); [/code]

Member Avatar for rowly
0
355
Member Avatar for Mattethington

Hey gang whats up? Here's my problem. Ever since i loaded win xp i have not had any audio through my speakers. i checked the driver in my sound and audio devices and it was installed but not working properly. So i uninstalled it, and downloaded again from the c-media …

Member Avatar for Mattethington
0
188
Member Avatar for jan1024188

please help me [url]http://www.linuxforums.org/forum/linux-applications/72657-qt3-designer.html[/url]

Member Avatar for jan1024188
0
101
Member Avatar for jan1024188

ok im newbie... i have a question if i have [code] #include <stdio.h> int main() { printf("type something:"); char a; scanf("%c", &a); printf("%c\n" ,a ); return 0; }[/code] i will aways get one character in output.My question is: -how to get world "hello" as standart output from variable using printf?

Member Avatar for jan1024188
0
126
Member Avatar for Laiq Ahmed

i want to calculate the complexity of the following code snippet [code] for(int k=0;k<n; ++k) for(int j=0; j<k; ++j) for(int i=0; i<j; ++i) cout<< "Hello World" <<endl; [/code] here! i got the hint! that summation of natural numbers series would be used if its correct why ? bit confused:sad:

Member Avatar for Infarction
0
96
Member Avatar for sugantha

I am doing a lexical analysis program and this is a part of the code that counts number of keywords [code] int keyword=0; char str[]="int float + - 78"; char* ptr; ptr=strtok(str," "); while(ptr!=NULL) { if(((strcmp(ptr,"int"))||(strcmp(ptr,"float")))==0) keyword++; ptr=strtok(NULL," "); } cout<<keyword; [/code] to my knowledge there is no imbalance of …

Member Avatar for iamthwee
0
95
Member Avatar for hano

hi iface aproblem in c program i want to write aprogram to read R={(1,2),(2,1),(3,3),......} then covert it to matrix0/1 please help me quickly

Member Avatar for iamthwee
0
87
Member Avatar for dhaya

i need a program urgently for round robin schedulng algorithm using circular linked list implementation.. please send a program using c++... post the prg to my mail id.. << moderator edit: removed email address >>

Member Avatar for Paul.Esson
0
1K
Member Avatar for usr1971ca

There is an algorithm in the software program that other team handed to me on linux. Given a set of requirements, our task is to create a test script/driver to verify that algorithm using a separate data file and spit out the result on the output file. The concept is …

Member Avatar for WaltP
0
129
Member Avatar for Jean5

Hi all I'm looking forward to purchase ExeCryptor ([url]www.strongbit.com[/url]) to protect my shareware. But before I'd like to know independent opinions/experience if any. My question is: Anybody uses execryptor? Can you tell me smth about? Are there some problems? Is it cost-effective? Thank you in advance for any reply Jean

Member Avatar for DMR
-1
187
Member Avatar for Seadragon

I am new at this but I think I may have it. This is the assignment: The program should ask for the Customers First Name and Last Name (Use Initials only for now) -Use 2 different variables, one for the first name and one for the last The program should …

Member Avatar for secretunfold
0
91
Member Avatar for shermaine
Member Avatar for Grunt
0
76
Member Avatar for zac_haryy

I keep on getting the erro "error C2064: term does not evaluate to a function taking 1 arguments" I have three of these errors and they are all on the first line after the if statements. I really dont know what is going wrong. Been working on this error for …

Member Avatar for zac_haryy
0
102
Member Avatar for tlly

Hello...I need to write a program where i need to copy each word of a string into an array... Eg(string s="hello how are you" arr[0]=hello,arr[1]=how....). any help:?: ??

Member Avatar for WaltP
0
107
Member Avatar for shermaine

Hi, Anyone here can advise me correction of my c programming? It doesn't seem to be working. #include<stdio.h> float x[4] = {1.2,2.4,3.6,4.8}; float f[4] = {0.1,0.2,0.3,0.4}; float xave = 0.0; float ftotal = 0.0; main() { int i; for (i=0; 1<4;i++) ftotal + = f[i]; if(ftotal!=1.0) { printf("error\n"); exit(); } …

Member Avatar for vegaseat
0
173
Member Avatar for clb2196

Hey guys, I'm new to C- I do Java- and for our OS class we're doing some basic code examples in C, on Linux. (Fedora core, if it matters). We're supposed to write a test program that shows the difference between how threads are run with round robin and fifo …

Member Avatar for Salem
0
235
Member Avatar for shermaine

The question is :Write a function bigger() that returns bigger vaule in a signed integer array. Array and size are passed as arugements. Write a main program that inputs Max values from the keyboard into siged integer array,array and prints using biggest(), the biggest vaule to the screen What should …

Member Avatar for WaltP
0
128
Member Avatar for rowly

[COLOR=seagreen]hi, i didn't get any reply probably coz ya didn't understand what i mean ![/COLOR] [COLOR=seagreen]alright i'll make it simple.[/COLOR] [COLOR=seagreen]i have a file in excel and i have to read from this file [/COLOR] [COLOR=seagreen]here is the contents of this file[/COLOR] [TEX] [COLOR=seagreen]2,joined,2929828,429.6,2[/COLOR] [COLOR=seagreen]4,toytoy,2929299,122.8,19[/COLOR] [COLOR=seagreen]3,front shift,2299229,205,22[/COLOR] [COLOR=seagreen]3,shift,1111111,222,20[/COLOR] [COLOR=seagreen]...[/COLOR] [COLOR=seagreen]...[/COLOR] …

Member Avatar for rowly
0
103
Member Avatar for vbcielle

i want to add all the inserted linked list by using this code but what happens here if i input 15 then 35 =50 but when i input again 30 the sum is 50whats wrong with my code? [CODE] int sum(nd **head){ nd *p,*sum1; p=*head; sum1=0; while(p!=NULL) { sum1->x=p->x; p=p->next; …

Member Avatar for vbcielle
0
152
Member Avatar for whitemoss

Hi all, I'd posted this problem previously but in the wrong place..:)..Hopefully, I can get the answer from this thread. I'm a newbie in C..Right now, I have to write a code to read a text file and then insert all the info inside that text file into database. Should …

Member Avatar for whitemoss
0
508
Member Avatar for rowly

Hello, can you guyz help write a while loop to read this line, for example 2,Joind,2082421,235.6,8 2= number Joind = item 2082421 = item number 235.6 = item price 8 = day all what i'm tryin to do is while reading each line if we encounter a ',' store all …

0
80
Member Avatar for shermaine

I have got this question: Write function of f(x) that return the number of bits set to 1 in an unsigned integer. So the outcome of the result will be sometime like f(5) = 2 cos [5 in binary is 101 and it got 2 '1s') Here's my program: #include …

Member Avatar for Ancient Dragon
0
331
Member Avatar for vijaiendran

how to pass a string as an argument to a sub fuction and what is the maximum limit of subscripts that the character array can hold as an argument in a function...

Member Avatar for Ancient Dragon
0
88
Member Avatar for vbcielle

Can anyone help me...i have a file modt.txt and i want to save the content in modt2.txt but it seems my code is not working. Moreover, if i have the content of the 1st file Have a nice day. i want to save it to the 2nd file without double …

Member Avatar for vbcielle
0
157
Member Avatar for jfinch99

I have a homework assignment that requires that I sort an array of Accounts that contains strings for ID, PIN, and balance. I believe that I need to sort the array based on the ID. And then I have to verify the ID that the user inputs to the accounts …

Member Avatar for jfinch99
0
71
Member Avatar for shermaine

Hi, I have got this question: Write function of bitcount() that return the number of bits set to 1 in an unsigned integer. Here's my try: #include <stdio.h> int bitcount(unsigned x) main() { int b; for (B=0; x!=0; x >>=1) if (x &01) btt return b; } When i compile, …

Member Avatar for shermaine
0
98
Member Avatar for shermaine

May i know how to write this program. Write a function bigger() that returns bigger vaule in a signed integer array. Array and size are passed as arugements. Write a main program that inputs Max values from the keyboard into siged integer array,array and prints using biggest(), the biggest vaule …

Member Avatar for Ancient Dragon
0
243
Member Avatar for shermaine

attached is the q of the c program....and here's what i try to write out... may i know how should i write to prompt user to enter the four weights from the keyboard. and the program should print an error message if the weights are out of range? Here's my …

Member Avatar for Ancient Dragon
0
80
Member Avatar for saqib

hello guys i am new in this forum and in programing i want to write a program which could convert given temperature and its unit into oher scales please give me some sugestions and ideas bout that and i need to know how to declear chareters and how to take …

Member Avatar for saqib
0
285
Member Avatar for jan1024188

can anyone please send me a simple graphcal program written i C. i found this but it doesnt work [CODE]/* Simple program to illustrate use of a dialog box */ main() { /* Define default values: */ int n = 0; float x = 0.0; /* Define contents of dialog …

Member Avatar for andor
0
86
Member Avatar for jan1024188

i ve got this #include <stdio.h> #include <math.h> void main() { int angle_degree; double angle_radian, pi, value; printf ("\nCompute a table of the sine function\n\n"); pi = 4.0*atan(1.0); printf ( " Value of PI = %f \n\n", pi ); printf ( " angle Sine \n" ); angle_degree=0; while ( angle_degree …

Member Avatar for andor
0
116
Member Avatar for Frydaii12

Im a student at YSU in Youngstown, Ohio and I'm taking a computer programming and problem solving class. I'm lost completely and I have this assignment that was given to me that I have no clue at all what to do. My question to you is could you please help …

Member Avatar for ~s.o.s~
1
94
Member Avatar for alksja

#include "stdafx.h" #include <stdio.h> #include<stdlib.h> #include<iostream> typedef struct Sale { int clientNumber[4]; char Item[45]; char PartNum[12]; int UniCost[11]; char DayOfMonth[20]; }; Sale rSale[197]; typedef struct Data { int clientNumber[4]; char Company[34]; char ABN[14]; char StreetName[36]; char Suburb[24]; char State[11]; char PostCode[5]; char Phone[15]; }; Data rData[10]; int _tmain(int argc, _TCHAR* …

Member Avatar for Ancient Dragon
0
190
Member Avatar for theUnNown1

Hi folks. I'm new to the board and I sincerely apologize if this has been posted time and again. I did search but couldn't find an answer. I am starting to program for the Symbian OS (never done it before) and have Visual Studio 2005 at my disposal. I've read …

Member Avatar for ~s.o.s~
0
122
Member Avatar for kimw

hi i have a function that opens a file and store the data into a matrix [CODE]void openfile(vector<vector<string> >& data, string path) { ifstream inFile; inFile.open(path); ....[/CODE] this does not work but it works when i eliminate the path as input [CODE]void openfile(vector<vector<string> >& data) { ifstream inFile; inFile.open("C:\file.csv"); ....[/CODE] …

Member Avatar for kimw
1
269
Member Avatar for rxgmoral

about ComboBox problem <<<<<<<Dialog.h>>>>>>>> public: CComboBox Cbx; struct Data { LPCTSTR lpszName; LPCTSTR lpszValue; int ID; }; <<<<<<<Dialog.Cpp>>>>>>> Data d; d.lpszName=_T("Name"); d.lpszValue=_T("Value"); d.ID=1; Cbx.InsertString(0,d.lpszName); Cbx.SetItemDataPtr(0,(void *)d); how to struct data append to ComboBox Control,thank:)

Member Avatar for Ancient Dragon
1
124
Member Avatar for vijaiendran

Can I know something about Sequential Search?? Answers within 24 Hours PlZ..

Member Avatar for Micko
0
63
Member Avatar for vijaiendran

Please provide me some sample programs that illustrates sorting techniques and about Sequential Search also..

Member Avatar for Micko
0
87
Member Avatar for Little E

I have a homework assignment to write a program about mileage. I've been able to get it to work, well except the average doesn't calculate correctly and I haven't been able to verifiy the users input. I'm using Visual C as my compiler. Can someone help me with checking the …

Member Avatar for Little E
1
175
Member Avatar for Iqbal_h_a

When I compiled the follwing code snippet, it compiled without any error. My question is if it is allowed to declare [I]char[/I] fields inside a structure, then how can I store character string in that variable(we can not use functoins like strcpy:-| ). OR Is it not allowed to declare …

Member Avatar for Salem
0
214
Member Avatar for compshooter

I get the following error on the first line of my array... " syntax error before `}' token " My eyes are about to fall out of my skull. Can someone take a look for me, everything seems to be fine, but maybe I'm blind. Here is the code in …

Member Avatar for compshooter
0
2K
Member Avatar for rati

[B]i want to find out small projects to work upon so as to improve my grip over c, can someone tell me some sites having projects in c:confused: [/B]

Member Avatar for rati
1
117
Member Avatar for anoop207

hello i want a programming concept in c in which it should take a query of sql and regarding table and then give the output as a resulting instance corresponding to query

Member Avatar for ~s.o.s~
1
80
Member Avatar for ATS

I am completing my degree in Multimedia and Software Developement. The two languages that are being focused on are VB.net and Java. When I finish my degree, I will have not had a class in C++. Is C++ not used very much any more? I was just kind of curious.

Member Avatar for iamthwee
0
78
Member Avatar for Fabii23

#include <stdio.h> #include <string.h> char* string(char *str); int main() { printf("%s\n ",string(" in this method ")); getchar(); return 0; } char *string(char *str4) { char str[25] = "How"; char str2[25] = " do I "; char str3[25] = " return a string"; strcat(str,str2); //append str2 to str and return str …

Member Avatar for WaltP
0
7K

The End.