18,491 Topics

Member Avatar for
Member Avatar for kapilsolanki84

suppose i hv 1 txt file in which i hv declared 1 path name of particular file. i wan to recall that file by using pathname from thaT particular file.say for eg: input file(path.txt) having pathname as "C:\\gp442win32\\gnuplot\\binary\\gnuplot -persist","w".now i wan to call this file in c code in order …

0
74
Member Avatar for akamini

Hi This code, compiles fine but results in a segmentation fault and when I comment out the part which adds the null character then the segmentation fault doesn't appear and it removes whitespace from the beginning but not the end. [code] #include <ctype.h> #include <string.h> #include <stdio.h> char *trim(char *s) …

Member Avatar for Narue
0
208
Member Avatar for shishh

I have a problem when I try to compile my code. Sorry in advance for non-english language in code.. npipe.c:78: warning: passing argument 1 of ‘sprintf’ makes pointer from integer without a cast /usr/include/stdio.h:361: note: expected ‘char * __restrict__’ but argument is of type ‘char’ npipe.c:80: warning: passing argument 2 …

Member Avatar for gerard4143
0
606
Member Avatar for amari ♥

hi guys! please help me understand anything about recursion and iteration ways of coding. :) (maybe some overview, details or something) thank u. we haven't had any further discussion about this. ;p but our teacher gave an exercise that goes like this: make a program that gets the summation of …

Member Avatar for saad749
0
248
Member Avatar for Joey_Brown

Hello. I have encountered a following problem "find all duplicate letters in a 2d char array and replace them with '@'" So for instance if I have this : a a b c The output would be @ @ b c So. I have come up with the following algorithm …

Member Avatar for Joey_Brown
0
152
Member Avatar for enchuk

Hello everyone, i need help with using recursion in writing quite a simple code, but i'm kind of lost with recursion. The assignment is: When the user enters a certain amount of whole positive numbers and presses enter, the main function calls to the recursive separate functions that do the …

Member Avatar for enchuk
0
130
Member Avatar for gouzou

Hi to everyone! I have a problem with the following code. Can someone please point to me the error? #include <stdio.h> struct network{ char *name; }network1; int counter=0; main() { void add_network(); add_network(); printf("You typed: %s\n", network1.name); printf("counter is %d\n", counter); } void add_network() { char network_name[150]; puts("Give me the …

Member Avatar for gouzou
0
171
Member Avatar for moroccanplaya

[CODE] ]void menu() { int option; printf("what would you like to do?"); printf("\n\t1. Create an Archive"); printf("\n\t2. extract an archive"); printf("\n\t3. Exit."); scanf("%d", &option); action( option ); } void action(int option) { int n1,n2; if (option == 1) { // how do i get from here to my code thats …

Member Avatar for Narue
0
97
Member Avatar for zerocool123

All right this is easy and for some reason im having trouble. Im workng on a Pig Latin program but right now all I want help with is getting an entire sentence to print out. I first tried to do this [PHP]char pig_latin() { char sentence[100]; printf("Enter a sentence\n"); scanf("%s", …

Member Avatar for Narue
0
1K
Member Avatar for moroccanplaya

after my program finishes i get this message and dont why, can anyone explain *** glibc detected *** ./tryp: double free or corruption (top): 0x089b8008 *** ======= Backtrace: ========= /lib/tls/i686/cmov/libc.so.6(+0x6b591)[0xb7729591] /lib/tls/i686/cmov/libc.so.6(+0x6cde8)[0xb772ade8] /lib/tls/i686/cmov/libc.so.6(cfree+0x6d)[0xb772decd] /lib/tls/i686/cmov/libc.so.6(fclose+0x14a)[0xb7719aaa] ./tryp[0x804875c] /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0xb76d4bd6] ./tryp[0x8048521] ======= Memory map: ======== 08048000-08049000 r-xp 00000000 07:00 1725249 /home/k/cprog/tryp 08049000-0804a000 r--p 00000000 07:00 …

Member Avatar for moroccanplaya
0
133
Member Avatar for MysticMan3000

hey guys, i was wondering if you could help me with my problem! i made a program that uses 3 arguments as inline commands: argv[0] is the name of the program) argv [1] is the name of the first file argv[2] is the name of the second file The purpose …

Member Avatar for vinitmittal2008
0
341
Member Avatar for thunderwolf07

can someone explain me what is the meaning of the number after the modulo (%) EX. printf("the number is: %10.2f", number); please help me define and understand the number after the % and give example, thanks!

Member Avatar for thunderwolf07
0
89
Member Avatar for Agnusmaximus

Does anyone know how to insert something like this: [URL="http://www.google.com/imgres?imgurl=http://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/XcodeWorkspace/art/code_completion_inline3.jpg&imgrefurl=http://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/XcodeWorkspace/100-The_Text_Editor/text_editor.html&usg=__tzUerpkyaa1hAhy4AIx5q3ncRqE=&h=288&w=679&sz=48&hl=en&start=0&zoom=1&tbnid=YT_0hr0Qkfu4UM:&tbnh=80&tbnw=189&prev=/images%3Fq%3Dxcode%2Bcompletion%2Bbubble%26um%3D1%26hl%3Den%26client%3Dsafari%26rls%3Den%26biw%3D1190%26bih%3D944%26tbs%3Disch:1&um=1&itbs=1&iact=hc&vpx=493&vpy=109&dur=463&hovh=146&hovw=345&tx=175&ty=56&ei=dAz3TJfiM9GAswaK_t3jDQ&oei=dAz3TJfiM9GAswaK_t3jDQ&esq=1&page=1&ndsp=25&ved=1t:429,r:2,s:0"]http://www.google.com/imgres?imgurl=http://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/XcodeWorkspace/art/code_completion_inline3.jpg&imgrefurl=http://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/XcodeWorkspace/100-The_Text_Editor/text_editor.html&usg=__tzUerpkyaa1hAhy4AIx5q3ncRqE=&h=288&w=679&sz=48&hl=en&start=0&zoom=1&tbnid=YT_0hr0Qkfu4UM:&tbnh=80&tbnw=189&prev=/images%3Fq%3Dxcode%2Bcompletion%2Bbubble%26um%3D1%26hl%3Den%26client%3Dsafari%26rls%3Den%26biw%3D1190%26bih%3D944%26tbs%3Disch:1&um=1&itbs=1&iact=hc&vpx=493&vpy=109&dur=463&hovh=146&hovw=345&tx=175&ty=56&ei=dAz3TJfiM9GAswaK_t3jDQ&oei=dAz3TJfiM9GAswaK_t3jDQ&esq=1&page=1&ndsp=25&ved=1t:429,r:2,s:0[/URL]

0
96
Member Avatar for moroccanplaya

[CODE] unsigned char buffer[1000] while(buffer < 0) num = fread(buffer,1, 1000, original_pointer); fwrite(buffer,1,num,copy_pointer); if(buffer > 1000) { //this is the place where i am stuck if the buffer exceeds how do i clear it then carry on reading and writing to a file ? [/CODE]

Member Avatar for moroccanplaya
0
173
Member Avatar for sh4rif

Hello every one! i want to create something like this (show at the bottom of this message as an attachment) but i've no clue how to create this digital payrmid. can anyone please help me with the code please? thanks for your help in advance cheers sh4rif

Member Avatar for myk45
0
128
Member Avatar for Castiel1631

I am creating an abstract data type for strings implementing the string functions but not using the string library. I have my .c file and my .h file below. The problem seems to lie in addMystring I have commented out the area's that seem to have the problem. when they …

Member Avatar for Castiel1631
0
2K
Member Avatar for TechieNoob

ok here is my project here so far: Main.cpp #include "Library.h" void main() { //GENERIC WECLOME SCREEN cout <<"\n\nWelcome to Hollow's Eye\n"; cout << "<Programmed by Ethan Rigel>\n"; cout << "Hollow's Eye a once bountiful and gorgeous land but alas; the\n"; cout << "Mighty Dragon has destroyed and ravaged our …

Member Avatar for mitrmkar
0
366
Member Avatar for azka

Hello, i have problem at address: 0x0040E0D6 mov eax,dword ptr [ecx] the solution would be to place an instruction to check if ecx is 0 and finishing this function, but how to do this? Thx!

Member Avatar for azka
0
178
Member Avatar for AlonsoPL

Functionality Read 2 numbers Print multiplication as in following example: 3333 1111 ---- ***3333 **3333 *3333 3333 ---- 3702963 Prepare following functions Modulo division (you cannot use '%') Mulitplication Print a number with leading and "following" spaces Please I need to do that in C language, I think the best …

Member Avatar for myk45
0
165
Member Avatar for tdba.316

Hi~ I've been stuck with this exercise for quite a few days. It's in a book I'm currently self-studying, C++ primer plus. The exercise requires using C syntax, while the exercise which follows this one requires using string objects instead, so i guess this is the appropriate forum^^. It is …

Member Avatar for peter_budo
0
414
Member Avatar for AlonsoPL

Functionality Read 2 numbers Print multiplication as in following example: 3333 1111 ---- ***3333 **3333 *3333 3333 ---- 3702963 Prepare following functions Modulo division (you cannot use '%') Mulitplication Print a number with leading and "following" spaces I have it: #include <cstdlib> #include <iostream> #include "conio.h" using namespace std; int …

0
64
Member Avatar for Mushida

Sorry but I'm having a problem whit this function that is meant to let me edit records in a binary file. After I enter what I want to change an attribute to the file remains unchanged. [CODE]void updateStudent(fstream & file) { S students; long lenth; char snum[10]; char editChoice = …

Member Avatar for Mushida
0
210
Member Avatar for Shankye
Member Avatar for shinsengumi

Hi, I'm kinda new to using MySQL,I just downloaded sqlite3 for my Linux. Can anyone give me some links to tutorials/sample codes that use MySQL and C as a programming language? Thank you

Member Avatar for mwasif
0
113
Member Avatar for gahhon

i wanna ask is that any statement can calculate number of occurrence of each letter (A-Z) instead of using switch statement or if statement to compare.

Member Avatar for Shankye
0
103
Member Avatar for |hex

i need help with, what i believe is complicated but probably isnt, on this following problem. i need to write a sequence of instructions that will do: variable5= -((variable1 + variable2) - variable3) + (variable2 - variable 4). thank you in advance.

Member Avatar for Tight_Coder_Ex
0
121
Member Avatar for rukia020
Member Avatar for Shankye
0
2K
Member Avatar for jeremy62

so basically i wrote a progarm that begins with a menu allowing you to select one of 5 functions, but at the end of whichever function i would like it to return to the menu the problem is i dont know how to do that and would like any tips …

Member Avatar for Shankye
0
286
Member Avatar for nightcracker

No error checking and other features, but a very basic .tar extracting snippet: [CODE]#include <stdio.h> #include <string.h> #include <stdlib.h> #include <sys/stat.h> struct tarheader { // for parsing the tar headers char name[100]; char mode[8]; char uid[8]; char gid[8]; char size[12]; char mtime[12]; char chksum[8]; char typeflag; char linkname[100]; char magic[8]; …

0
71
Member Avatar for VilePlecenta

I am interested in being able to make a C++ win32 program that will simply display someones profile on a phpbb3 forum when they enter in their credentials. I've already made the GUI and other misc code needed for displaying the information, but I dont know how to make the …

0
107
Member Avatar for Member #853590

hello again i got an assignment i thought i understand it but the every time i read it i understand it differently. my teacher won't explain the exercise. here is the exercise [IMG]http://img42.imageshack.us/img42/8331/37255827.png[/IMG] he also gave an input output example located here [url]http://rapidshare.com/files/434579925/sorted.zip[/url] i'v learned using shmat & shmget and …

Member Avatar for Adak
0
145
Member Avatar for kapilsolanki84

hello can any 1 hlp me for creating a secured exe file of an console application.means i hv created 1 program in c using dev c++ as compiler. now it is creating an exe file of the project in the same project directory. thats fine. nw along with that exe …

Member Avatar for Member #853590
0
261
Member Avatar for atramposch

I wrote this function for an assignment. It utilizes dynamic memory, which grows and shrinks as needed. I wrote it like this at first: [CODE]int user_input (int * array, int intSize) { printf("Please enter any number of integers (80 characters per string max), enter an empty string to signal input …

0
94
Member Avatar for shellac85

Hi guys here is my code, prettty much the same as one posted before but im getting a few errors. Fairly new to this so if someone could help me out i would greatly appreciate it. Thanks in advance:) Here is the code and errors underneath that: #include<stdio.h> #include<string.h> #include<ctype.h> …

Member Avatar for Shankye
0
231
Member Avatar for codecodile

Hi, Can anyone help me finding an application which can read listbox values of any other window on screen and save the list items either to clipboard or some text file, etc. This may be done by getting the handle of the window/listbox and then reading the values, etc. I …

Member Avatar for rohan1020
3
414
Member Avatar for bkoper16

I need help with a program that is supposed to take data on football players from a txt file and place them in a binary search tree then use case statements to t osearch the tree inorder, preorder and postorder recursively here's what i got so far [CODE] /* Bradley …

Member Avatar for Narue
0
214
Member Avatar for esy928

Hello Guys! it's been a while. Lately, I've been wanting to study & explore C/C++ more. Because of this, I've done a lot of exercises that was given to us at school and some more around the net, but sadly the one that I'm really looking forward to the the …

Member Avatar for Shankye
0
481
Member Avatar for atoivan

i want to write a a program that will accept student name and grades and output it.use an array data structure in the implementation this program and implement the following write method that will traverses the array and allow the user to perform the following processes a) search for a …

Member Avatar for atoivan
0
215
Member Avatar for its.romi

im a student of 2nd year BS, doing my BS in Computer Science. Here I want to include a program by me, may be someone will be helped by me :) [code=c] #include<stdio.h> #include<conio.h> #include<stdlib.h> int* createHashTable(void); void getData(void); void formatting(void); int insertData(int); float chkLoadFactor(int, int); int collision_LinearProbing(int, int,int); int …

Member Avatar for zohaib yousuf
0
325
Member Avatar for Alerwiali

It is supposed to tell me the occurrences of letters both upper and lower case and digit and non letter nor digits characters ,,but it does nothing ,,please help as soon as possible #include<stdio.h> #include<ctype.h> #include<conio.h> int main(){ FILE *fp,*f2,*f3; char ch,temp; int i,j; int lowercase[26]={0}; int upperCase[26]={0}; int digits[10]={0}; …

Member Avatar for Shankye
0
171
Member Avatar for kapilsolanki84

using dev c++ as compiler,bt coding the program in c.suppose i hv created 1 program in console application ,compiled it,run it, it works fine,on compiling & running it,. it produces the various supported assosciated with it. like makefile.win,gmon.out,project.exe,project.dev,main.o,main.c,now on seeing these files in notepad 1 can easily determined that program …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for sciprog1

Hello, On the UNIX system that I am current working, to open a file in the pico editor ,I need to do the following: [CODE]>./pico filename.c [/CODE] Is there a script/command that I can execute which will remove the dot/slash and change that to: [CODE]> pico filename.c [/CODE] Thank you!

Member Avatar for sciprog1
0
86
Member Avatar for sciprog1

Hello Members, I have the following question about the pipe() system call. Say, Process A (my main()) forks a Process B which then forks a Process C. How can I open a pipe between Process C and Process A? I would like to write a sentence in Process C and …

Member Avatar for sciprog1
0
142
Member Avatar for thunderwolf07

hi! im also a beginner in using C im confused because ive got a problem. which the answer of C is different from mine here's my problem: !our teacher ask us to covert yards to meters, inches, feet. (my problem is the meter) feet = yard * 3 inches = …

Member Avatar for thunderwolf07
0
163
Member Avatar for fg_aa_c

Hi I'm new here and I have a problem which is hindering me. I have opened a file and wrote some stuff to it. Then later on I want to open the file and read it back in to a buffer. When I try to read the file back in …

Member Avatar for Madawar
0
150
Member Avatar for localp

I successfully configured MYSQL with VS2008, i executed the following code, and no errors were thrown. [CODE] #include <mysql.h> #include "stdafx.h" void main() { }[/CODE] Now i need to write a C++ code to retrieve some values from a Database, therefore i used the following code; [CODE] #include <mysql.h> #include …

Member Avatar for localp
0
296
Member Avatar for atramposch

[CODE]void user_input (int * array, int intSize) { printf("Please enter any number of strings (80 characters per string max), enter an empty string to signal input completion\n\n"); int i = 0; int j = 0; int arrayMax = MAXARRAY - 1; char input[81]; while (input[0] != '\0') { printf("->"); i …

Member Avatar for Shankye
0
172
Member Avatar for Billybe

Hello I am trying to read from a file. I'm followed a tutorial and had it working perfectly before, and it still does now.. But the problem is that one variable that I'm reading from the file is causing my program to crash. All the other vars I'm reading, are …

Member Avatar for Billybe
0
274
Member Avatar for berwick53

I have a CSV file with the following data 15278349,567892,3456,9742.30,CASH-WITHDRAWAL-200.00,DIRECT-DEBIT-200.00 64328975,632489,7562,98734.65,CHEQUE-DEPOSIT-100.00,CASH-DEPOSIT-424.54 etc... How would I print to screen the individual lines instead of just the top line?? Sam

Member Avatar for Narue
0
117
Member Avatar for moroccanplaya

hi i made a program that lets a user creates a file and then lets the user open a file that he would like to copy into the new file that he created. now the question is how do i extract the copied file or extract multiple coped file from …

Member Avatar for moroccanplaya
0
134

The End.