15,551 Topics

Member Avatar for
Member Avatar for Vytautas

Hello, I'm trying to open file using a function in a header file and I think it works but I'm unsure if it's written as it should be. Should I use double pointer inside the FileOpen function like argv is or not? It also works without double pointers and that's …

Member Avatar for JuhaW
0
106
Member Avatar for shahab.burki

I have created a linked list which stores data from file. However I got stuck when I try to print the contents of Linked List. The code is below 1.Text File [CODE]102.15.12.10 15.14.106.6 1591 1592 bit_torrent 102.15.12.10 15.14.106.6 1591 1592 bit_torrent 102.15.12.10 15.14.106.6 1591 1592 bit_torrent 102.15.12.10 15.14.106.6 1591 1592 …

Member Avatar for JuhaW
0
80
Member Avatar for sree_ec

Hi, i have some questions mostly regarding the memory segments... Can any one help me out.. 1. During a function call in C, where is the return value of the called function stored.. This is mainly a question came when i was thinking of steps during a function call. The …

Member Avatar for sree_ec
0
83
Member Avatar for tquiva

I am trying to modify this function to read input in a noisy environment, meaning the characters received in the input may have extra characters. A protocol that I am trying to implement is to send each digit twice in a row so that unless the receiver gets two of …

Member Avatar for nezachem
0
114
Member Avatar for sunnynight

Dear All, I have a text file containing these lines: [QUOTE]12345 12 123 1234 123456 1234567890 123456789032453 1234567890724832445 12345.123456 12345.123 12.12 12[/QUOTE] And I want to read them from c:\numbers.txt and store them into an array and then do some calculations, then save the results in another file(c:\results.txt). I have …

Member Avatar for Banfa
1
6K
Member Avatar for Etherwind

I'm getting a compiler error in one of my .c's that I don't understand. I'm getting [icode] Tree.c: In function 'newTree': Tree.c:301: error: expected declaration or statement at end of input [/icode] What I don't understand is that newTree and line 301 are completely separate functions. I can get the …

Member Avatar for Etherwind
0
172
Member Avatar for vino4all

How to get the following output using c? ---1 --12 -345 6789 Please guide me with the code. It can be a blank space instead of '-'.

Member Avatar for 0x69
0
363
Member Avatar for Mena samy

hello I am trying to send an array of character but when i receive it in the other processor i receive it with garbage !!! any suggestion? [CODE] #include <stdio.h> #include "mpi.h" int main (int argc, char *argv[]) { MPI_Status s; int size, rank; char line [128]; //char* str="hjfjh"; static …

Member Avatar for Mena samy
0
186
Member Avatar for COKEDUDE

Could someone please tell me what these errors mean and how to fix them. [CODE]inputter.c: In function âget_next_tokenâ: inputter.c:21: warning: initialization makes integer from pointer without a cast inputter.c:17: warning: unused variable âcur_posâ[/CODE] [CODE]/* Get an RPN expression from the keyboard. * Accepts q as indictation that user wants to …

Member Avatar for jephthah
0
176
Member Avatar for xyzt

Hello I try to send DHCP RENEW packets to the network and receive the responses. I broadcast the packet and I can see that it's successfully sent using Wireshark. But I have difficulties receiving the responses.I use packet sockets to catch the packets. I can see that there are responses …

Member Avatar for xyzt
0
317
Member Avatar for vizionary2012

Hi again im a new comer im from Jamaica, i have an assugnment due wednesday and im trying to make my project look proffessional, in C there is a keyword called struct and im familiar with using structures, i was just wondering is there anyway to search for strings or …

Member Avatar for Adak
0
100
Member Avatar for jadedman

do you know where to find GL/glut.h code? i only found gl.h, glaux.h and glut.h in some links. can you help me?

Member Avatar for od3_85
0
210
Member Avatar for commentator8

Hi all, I am new to C, and till now have only done python (a years worth at university), and am finding myself running into walls whenever i try to do seemingly simply stuff. One of the main issues in comparison is the lack of a interpreter and Ch is …

Member Avatar for rajuln
0
410
Member Avatar for shahab.burki

Hi, My code reads a string from a file. But it misses the lastone. can you help me? 1..Text File [CODE]102.15.12.10 15.14.106.6 1591 1592 bit_torrent[/CODE] 2.. Code [CODE]#include <stdio.h> #include <stdlib.h> #include <string.h> struct list_node{ char src_ip[15]; char dst_ip[15]; char src_port[4]; char dst_port[4]; char protocol[15]; }; typedef struct list_node node; …

Member Avatar for shahab.burki
0
96
Member Avatar for tquiva

Please bare with me. I am still a newb at programming and this may seem a bit confusing, but I have many comments and debug lines. This is an extremely long code, but could the advanced programmers out there please help me out? The goal of my program is to …

Member Avatar for WaltP
0
393
Member Avatar for tquiva

I am creating a program that calculates the average for a bunch of numbers. The first input is the number of values, and the second output is/are the numbers. For example, with the inputs of the following, I would get the outputs afterward. 5 10 20 30 40 50 Average …

Member Avatar for Aia
0
3K
Member Avatar for prade

hi, i have a code which i had done on turbo c++ ide with graphics in it...the nature of the code was such that i was able to read data & view graphics on the same window ...recently i tried winbgim on dev c++ but in this compiler the graphics …

Member Avatar for jephthah
0
91
Member Avatar for jgehlot09

I am compiling the code with icpc command and I want to change the color of specific text in the program. How can I do that?

Member Avatar for jephthah
0
81
Member Avatar for daveoffy

Hello, I have a program where after you login, I need it to re-design the whole window. Is there a way I can change the WndProc to make the code cleaner. Thanks. I have a case for the login if successful, so it will be put in there.

Member Avatar for strmstn
0
133
Member Avatar for jgehlot09

I am trying to write an function, which takes an string as input and do something and return the strings. Here Is a small try from my side. [CODE] #include<stdio.h> char algo(char n) { char result[15]; if(n=='1' || n=='2' || n=='3' || n=='4' || n=='5' || n=='6') { result = …

Member Avatar for Adak
0
94
Member Avatar for bohongtw

Hi there, i m working on dining philosopher problem , i wrote some codes but i keeps giving some error like : "/tmp/ccMEjOtr.o: In function `philosopherRun': betterDiningPhilosophers.c:(.text+0x7a): undefined reference to `pthread_mutex_trylock' /tmp/ccMEjOtr.o: In function `main': betterDiningPhilosophers.c:(.text+0x54d): undefined reference to `pthread_create' collect2: ld returned 1 exit status " even i try …

Member Avatar for jephthah
0
212
Member Avatar for mauryoung

ok i have this project that i have been working on to fin harmonic,powerful,amicable and perfect numbers i have a few but im at a road block right now and would love some assisstance. [B]POWERFUL NUMBERS[/B] [CODE]#include <iostream> using namespace std; int main() { int endRange = 500, var1, var2, …

Member Avatar for WaltP
0
226
Member Avatar for ssDimensionss

hey guys, as well all know, C rounds downwards, anyway, i'm trying to write a function that would make it round upwards, and got something like this: [code=c] int round_up(float x) { int y = 100*x; double z = 100*x-y; if(z>0) y = (x+0.01)*100; else y = x*100; return y; …

Member Avatar for 0x69
0
6K
Member Avatar for muqing

Hey everyone, I'm a program newbie, I'm writing a code for sorting numbers from a input file, qsort(array, array_size, sizeof(int), (*compare)(const void *, const void *)); since the array_size may vary for different file, I can't just use int array_size= some # How would I write this? Thank you very …

Member Avatar for JuhaW
0
81
Member Avatar for vizionary2012
Member Avatar for Ancient Dragon
0
55
Member Avatar for tquiva

I have two for loops that I would like to convert into while loops instead. This is the entire code of the program. This program simply asks a questions and determines whether the input is a yes or no based on the first character of the line. [CODE]#include <stdio.h> #include …

Member Avatar for tquiva
0
142
Member Avatar for rookie-C

I am busy to make a program that starts with a menu, where you can choose different options. One of these options to execute a program. for example : download software in an flash-prom with loader.exe loader idpartno.sr(where idpartno.sr is the code to be downloaded. Thanks for helping.

Member Avatar for jephthah
0
7K
Member Avatar for paradiseis

Write a C program that accepts 3 parameters. Each parameter indicates the quantity of product to be produced. Each product will be produced in different production line. Ready products will be placed in a buffer area located at the end of each production line. Packaging workers will pack the products …

Member Avatar for jephthah
0
564
Member Avatar for vino4all

Hi, I'm a newbie............ Sorry, if I violate any norms. Is it possible to copy any audio file or image file using C language? I think it is possible. If anyone knows it please guide me. If you know the code, that 'll be helpful.

Member Avatar for jephthah
0
234
Member Avatar for prakakat

Hi everyone, I am a newbie in C programming. I need to make an implementation of gets() function from stdio.h, but I am not sure where to start. Please advice, any help is welcome. Thank you, Brian.

Member Avatar for Ancient Dragon
0
86

The End.