19,876 Topics

Member Avatar for
Member Avatar for CoolAtt

hi all. i have read a text line from a file using [CODE]fgets() [/CODE]into a char array [CODE]char astr[30][/CODE] then i did [CODE]strcat(astr,"secondstring") [/CODE] The output of [CODE]printf (astr)[/CODE] is appearing on 2 lines instead on same line. plz advise me wat i did wrong. thanks.

Member Avatar for Aia
0
5K
Member Avatar for xponse

I w'd like tom Download Turbo C (window version). Can any one sugget any site, thank in advance :confused:

Member Avatar for ~s.o.s~
2
459
Member Avatar for tasosa

[code=language] #include <string.h> #include <stdlib.h> #include <stdio.h> /* uni() function takes an array an thier size.and it produce an array which is include unique element */ int uni(char *arr[],int size) { int unique = 0; /* The length of dst after removing duplicates */ int n=size; char *dst[n]; /* The …

Member Avatar for BestJewSinceJC
0
109
Member Avatar for Poab9200

Ok, first things first. Hello everyone, I have a question. How would I go about adding Shortcut Arguments to my program(Code shown below). My idea: I play a game called [I]Counter-Strike:Source[/I] and recently I've needed to gather all the names of custom maps added to the \map directory. To the …

Member Avatar for ddanbe
0
261
Member Avatar for vddmanikanta

Sairam to everyone Good morning I am using AVR Studio to compile MuCOS II onto Micrium site. Micrium is the provider of all MuCOS II an RTOS for various ports. I had the following error : ../../os_dbg.c:25: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'INT16U' Addressing this line: …

Member Avatar for Salem
0
65
Member Avatar for korssane

hi all, i am developping a c# asp.net web app and i have a few questions please. 1- i want to make visible a dropdown list when a certain radiobutto is checked. 2- i want to add this dropdownlist to the same Groupe name as the radio button ( could …

Member Avatar for Sri_r
0
181
Member Avatar for wakeboarder1335

Hello, I was wondering how I could connect to a server using the client that I wrote below, that requires a username and password. I'm a little confused when it comes to reading the man pages. [code=C] #include <arpa/inet.h> #include <errno.h> #include <math.h> #include <netdb.h> #include <netinet/in.h> #include <signal.h> #include …

Member Avatar for Ancient Dragon
0
91
Member Avatar for vddmanikanta

Sairam all I had hard time with this particular problem. I have downloaded from Micrium Website MUCOS a RTOS. I used AVR Studio,and try to build the OS. But unfortunately I encountered this problem: --->" __root" is compiler directive for IAR compiler and this tells the compiler not to optimize …

Member Avatar for Ancient Dragon
0
443
Member Avatar for kaku_lala

Folks, I have been told that there is one logical problem with this code. Basically, this is an implementation of the library function strcat(). The intended beahviour of this function to concatenate ct to the end of s. Return s. I could not find any logical problems with the code, …

Member Avatar for ArkM
0
134
Member Avatar for bemo55

Hello. I am trying to do a project with linked lists. It seems that everything is coded correct in my code to create new nodes and move my pointers and such. But for some reason my function that is supposed to print all the names stored in my list only …

Member Avatar for VatooVatoo
0
298
Member Avatar for kaos

Hi, im lookin for a c function which will take hex values stored in two different integer variables say TH1,TL1 . So say TH1 has FF and TL1 has 00,then i need a program that will convert the effective value FF00 to decimal ,ie 65280 stored in a variable say …

Member Avatar for VatooVatoo
0
95
Member Avatar for moiron

i need help making a password program. it lets the use input a password and check it if it is following the password rules, which are the following: must have exactly 7 characters, only alphabets and digits are allowed. i don't exactly know how to put that in an if …

Member Avatar for dmachop
0
175
Member Avatar for brandguru

Hey All I want to create a simple dice golf game in C# The basic idea is: A player rolls 3 random dice until they roll a double The number of rolls taken until a double is rolled is calculated and displayed on the console This is run 18 times …

Member Avatar for Poab9200
0
2K
Member Avatar for ngibson12

Hello guys, I am new to this forum, but I am sure I will be an active one as I am a computer science major. I am still kindof new to c programming and am hitting a major issue. I am writing a echo client server code and I am …

Member Avatar for jephthah
0
168
Member Avatar for BimanD
Member Avatar for Toila

[CODE=c]#include <stdio.h> #include <string.h> #include <stdlib.h> #define TRUE 1 #define FALSE 0 void Result (char *result, char string, char remove); char *RemoveChars( char *src , char *key ); int main(void) { char string[] = "Alesia"; char remove[] = "aeiou"; char result; Result (&result, string, remove); fflush(stdin); printf(" Press any key …

Member Avatar for WaltP
0
2K
Member Avatar for lilballeer

hello, I am trying to change my current code to include the following class definition. class studentType { private: string studentFName; string studentLName; int testScore; char grade; public: void getData ( ifstream & inFile, studentType sList [ ], int size ); void calcGrade ( studentType sList [ ], int size …

Member Avatar for vmanes
0
234
Member Avatar for AfroZenPizza

I need a better solution to a while loop that continualy checks the current time against the time that the user would like the program to end. This loop spikes the processor usage to 100%. [CODE]while( time(NULL) <= endTime ) { printf("\r%4d", endTime - time(NULL)); }[/CODE] Thanks in advance.

Member Avatar for jephthah
0
67
Member Avatar for gryft

I want to analyze the content of a text file & search for a string in the file. It is assumed a sentence is terminated by a , . ; ? ! This is what i have so far [code] #include <iostream> #include <fstream> using namespace std; int main() { …

Member Avatar for tux4life
0
165
Member Avatar for cskumar

i have a online logging of data through com port. the c program captures the online data every 1 minute, calculates ten minute average, standard deviation and then writes it to a file. the file is created with getdate function. when the day changes, i have to create the new …

Member Avatar for Ancient Dragon
0
90
Member Avatar for smitem03

this is coming off a program that collects information and saves it after every command. I have opened my file successfully cause thats how it reads the client. the problem is saving the data. Does this code look right to everybody??? I am running in C and very very basic. …

Member Avatar for jephthah
0
92
Member Avatar for ni30rocks

I am developing i a c-editor which can run graphics on VISTA and can use minimum system RAM and processes. I need C help file database wich can be linked to my software

Member Avatar for ArkM
0
85
Member Avatar for Bladtman242

Hi, are there some libraries i can use (in MS windows) for stuff like, obtaining info from a website? i read something about sockets once, but im not sure what it is (yes, i googled it :) ) Or would be easier/better, as some suggest, to learn java or python? …

Member Avatar for Bladtman242
0
147
Member Avatar for boujibabe

I thought I was finished with this program but now I can’t find a way to make it quit. The loop continues even when I enter the terminating character. I’ll post he whole thing. The answer may be simple but I'm just not seeing it. [code] do{ do{ system("cls"); printf("Enter …

Member Avatar for jephthah
0
201
Member Avatar for gamodg

Hi I have a cgi controller that takes requests and depending on request it invokes the object of the desired class which generates a XML and sends the XML as a response. On the client this XML is combined with XSL to display a HTML page. For ex. [CODE] request---->controller------->router.cgi(a …

Member Avatar for Salem
0
73
Member Avatar for Svolacius

In file "sudoku.dat" is 9x9 size matrix. In one 3x3 bloc, can be from 2 up to 6 unknew digits, however main unknow digits amount in all matrix, must be not over 36 digits. Unknow places marked with symbol ? Example (3x3) ?9? 4?? ?32 I need program which could …

Member Avatar for Aia
0
119
Member Avatar for qajaq49

I'm trying to write a short bit of C code that will get a filename from the user, via the keyboard, and open the specified file, but I haven't been able to get fopen() to recognize the variable filename when I use fgets() to get it. Here's a snippet of …

Member Avatar for qajaq49
0
702
Member Avatar for moteutsch

How can I clone an object in C++, so it is a seperate object, but exactly the same as the original? Thanks, - Moshe

Member Avatar for moteutsch
0
79
Member Avatar for Kamal_Java

Hi I am new to java and need help . Whats the C++ map equivalent in Java. In C++ i can use map for three purposes like i) Sorting while insertion into it ( efficient ) ii) Key ,value iii and for storing unique item. I came to know there …

Member Avatar for Ezzaral
0
136
Member Avatar for karthik.c

hi guys im trying to code patricia trie in c using gcc and when i debuged the program im gettin segmentation stack problem in search function of it.im not sure why it is showing and i've included pat.c,pat.h and ncspatricia.h files. i also want to know what is the difference …

Member Avatar for karthik.c
1
151
Member Avatar for kaku_lala

Hi Guys, First post here, so be gentle :-) I was going looking for an implementation of memcmp(), I found this code snippet, but it is clearly marked that there is 1 logical error with the code snippet. Could you help me find the logical error. Basically, I tested this …

Member Avatar for ArkM
0
351
Member Avatar for kaku_lala

The definition of library function strspn is: [CODE]size_t strspn(const char *str, const char *chars) /*Return number of leading characters at the beginning of the string str which are all members of string chars.*/[/CODE] e.g. if ‘str’ is “fecxdy” and ‘chars’ is “abcdef” then the function would return 3, since ‘f’, …

Member Avatar for Aia
0
94
Member Avatar for DaveD3

I am new to C# and .NET and am having a problem. I have a windows form application. I created a Ole data adapter to look at an Access Database with 3 tables. I then created a dataset which gets loaded by the adapter when the process starts. I then …

Member Avatar for Diamonddrake
0
82
Member Avatar for anraevlus18

please help me.. am using turbo c 3.00 i'm gettin a compile time error : Lvalue required. ------------------------------------------------------------- [code] #include<stdio.h> #include<conio.h> #include<stdlib.h> int func(int x,int y) { int *ptr1=&x,*ptr2=&y; int **ptr_1,**ptr_2; *ptr_1=ptr1; *ptr_2=ptr2; printf("\nUsing function pointer : "); printf("\nx=%d\ny=%d",**ptr_1,**ptr_2); int sum=*ptr1+*ptr2; return sum; } main() { int *fnptr(int,int); // declare …

Member Avatar for Ancient Dragon
0
100
Member Avatar for Joukon

Hey all. First time user here :) Im making a Windows XP C++ console application with Code Blocks (GNU GCC Compiler). This program is written to control another program that is missing some features i need (read input from external source). Last thing im missing from my program is little …

Member Avatar for Ancient Dragon
0
368
Member Avatar for jyo_84

can any one help, need a program to search a particular word in a file (its a .dat file ) then count the number of it occurrences in the whole file, output the count on console. I have not worked with programs before..........

Member Avatar for mayank.cracker
0
76
Member Avatar for grandalf62

I would very much appreciate any advice on this. I am reading a single byte from the serial port and wanting to store up to a hundred of these. Essentially I need to check incoming data to see if the value of it has been sent previously. These are my …

Member Avatar for jephthah
0
89
Member Avatar for rishabjain

Write a program to implement a survey that prompts respondents to enter an integral value within a specified range to indicate how they like a new product. Since the program must be adaptable to any arbitrary number of respondents and value ranges, define macro MAX_RESPONDENTS to represent the maximum number …

Member Avatar for VernonDozier
-2
297
Member Avatar for OffTheLeft

Hi all, I am in need of some assistance with addresses & pointers as my dysfunctional professor is of no help. (I'll be as succinct as possible.) First, the program must call three subroutines from main to fill "n" array elements with a given value; for instance, one must set …

Member Avatar for OffTheLeft
0
106
Member Avatar for nokiolurv

can someone help me complete this code please, on the ares i put comments please. thanks #include <stdio.h> #include <string.h> class wordRecord { public: char* word; wordRecord* next; void printWord() { printf("%s\n", word); }; }; class abstractWordList { private: void printWordsHelper(wordRecord* wordRecPtr) { if (wordRecPtr) { // Code omitted to …

Member Avatar for Sky Diploma
-1
120
Member Avatar for BruenorBH

I want a user to be able to select an audio file to play but am unable to figure out how to create a file open dialog box in Win32 API. I could create one from scratch but am hoping that there is an easier way than manually creating it. …

Member Avatar for BruenorBH
0
168
Member Avatar for metal_butterfly

I have a client /server file operation program.It works properly when i run the client and server program in the same system.but when i try to run the client in one system and server in another system i am getting an error in the cleint machine as "ERROR:Connection refused". Plz …

Member Avatar for xyzt
0
105
Member Avatar for TheBeast32

Hi, I'm using GNU MP to get very precise square roots of numbers. I have three questions about my code below. [Code] #include <stdio.h> #include <stdlib.h> #include <gmp.h> int main(int argc, char *argv[]) { mpf_t num, sqrt; FILE *out; mpf_init2(num, 1000000); mpf_init2(sqrt, 1000000); printf("Enter a number to get its square …

Member Avatar for jephthah
0
191
Member Avatar for jagdeep89

Q1: Write a program to implement a survey that prompts respondents to enter an integral value within a specified range to indicate how they like a new product. Since the program must be adaptable to any arbitrary number of respondents and value ranges, define macro MAX_RESPONDENTS to represent the maximum …

Member Avatar for ndeniche
-1
366
Member Avatar for tasosa

[code=language] #include <string.h> #include <stdlib.h> #include <stdio.h> /* uni() function takes an array an thier size.and it produce an array which is include unique element */ int uni(char **arr,int size) { int unique = 0; /* The length of dst after removing duplicates */ int n=size; char *dst[n]; /* The …

Member Avatar for Narue
0
193
Member Avatar for vddmanikanta

Sairam Hai everyone,I just want to know : 1. what is full form of asm 2.what is the equivalent C code supported by gcc.running on SUSE Linux platform. asm PUSH;CLI asm POPF

Member Avatar for Narue
0
55
Member Avatar for Akis2000

ok i have 2 series of p... the user give which one was want... and then give the iterations that he/she want this is the series 4. P= sqrt(8*(1+ (1/9)+(1/25)+(1/49)+... )) 5. P= sqrt(24*((1/4)+(1/16)+(1/36)+(1/64)+...)) code:: first for series 4..... [code] int i; double: serieValue=0,pi=0; cout<<"Iterations"; cin>>i; for (long int n …

Member Avatar for Akis2000
0
115
Member Avatar for Sky Diploma

Hey all, I have decided that in order to learn i will need to write code. So i am working on all the questions on my book. And as I am teaching myself i end up with no-one to scrutinize my code. [code=c++] #include <iostream> /************Declarations of Functions*********/ void func1(); …

Member Avatar for lqdo
0
358
Member Avatar for LucyB

Can anyone recommend a good resource for revising for my c++ exam? Thanks

Member Avatar for hawash
0
106
Member Avatar for legendarya49

I'm trying to determine if the characters in the maze can escape, the characters are labeled by their initials except for D which is the door here is the input data: 11 13 7 10 XXXXXXXXXXXXX X JX AX X XXXX XXXXBX X X X SX X X X XXXX …

Member Avatar for jephthah
0
205

The End.