19,876 Topics

Member Avatar for
Member Avatar for vedro-compota

hi everyone)) Please tell me - where is the mistake here - [CODE]struct address {char* city ; char* street; int housenumb ;}; struct addinf {int age; struct address* address;}; struct student {int number; int kurs; char* name ; struct addinf* addinf;} stud; stud.number=1; stud.addinf.address.housenumb =123;[/CODE] thanks in advance)

Member Avatar for vedro-compota
0
302
Member Avatar for moroccanplaya

is it possible to copy specificity from a file for example i want to copy x number of bytes from x position to x position?

Member Avatar for Narue
0
97
Member Avatar for zetologos

this code doesnt work, as in it only asks the user for getchar once and putchar once. i tried putting it in two method and it didnt work either. also whether it be char or int it is the same. that leads me to another question. why is it allowed …

Member Avatar for Narue
0
136
Member Avatar for vedro-compota

Hi guys! please tell me - how to determine the length of the input stream without reading simbols ? (for save the input string) thanks in advance ))

Member Avatar for vedro-compota
0
86
Member Avatar for vedro-compota

Hi guys! )) please reply - how to clear the input stream of the console? thanks in advance ))

Member Avatar for vedro-compota
0
194
Member Avatar for eminhanif

I've been having some problems trying to extract the GET variables from URL. This is what the url looks like: www dot example dot com/live/t00/250lo.gif?tr7zt8&uid=4ccc6cd4fc7cc630&CXNID=2000001.5215456080540439072NXC&pub=telegraphmedia&rev=86981&si=4d28ac59f9a3d32e&lc=MDAwMDBFVUdCRU4yMzE4MTgwNDAwMDAwMDBDVg%3D%3D&ln=en&pc=tbx&uf=0&pi=1&dp=www.telegraph.co.uk&fp=news%2Fuknews%2F8248083%2FFather-drowns-while-trying-to-rescue-dogs.html it's a bit long, but basically each variable is separated by an ampersand, so we have, for example: uid=4ccc6cd4fc7cc630&CXNID=2000001.5215456080540439072NXC&pub=telegraphmedia&rev=86981 which translates into: uid=4ccc6cd4fc7cc630 CXNID=2000001.5215456080540439072NXC pub=telegraphmedia …

Member Avatar for vinayakgarg
0
163
Member Avatar for mfaisalm

I am a fresher in C and working in Linux.I created two small programs that can interact with each other. That means both can send strings to other one with in two terminal. I want to interact from two system like IP messenger. How can I make this. Socket? Pls …

0
56
Member Avatar for o0OPatriciaO0o

Hi! This is a real simple and stupid exercise I thought I knew how to handle. The complete heading is: - Write a function in C whose input is a real number and whose output is the absolute value of the input number. The following is the code I've developed. …

Member Avatar for o0OPatriciaO0o
0
242
Member Avatar for 123Faisal

Hi guyz! [B]My name is Faisal Rashid.I am student BCS.Kindly I need your help.Please give solution of following problem as quick as possible.I need this urgent. Thank You I need a solution of Puzzle of from a book "Let Us C by Yashwant kanetkar" and question is from Chapter 8 …

Member Avatar for WaltP
-2
97
Member Avatar for amir malik

hello everyone... m writin a code that will take data frm stdin from user which can b of indefinte size.. but i cant make use of static arrays....and even calloc and malloc is not working properly...what sud i do??? thanks for help...

Member Avatar for amir malik
0
286
Member Avatar for JonaRab

hey everybody can anyone helps me, please? i must program a projekt but i don´t know how i do it. the projekt: Write a program to convert from 12-hour time format to 24-hour time format. The 12- hour format has the form hours:minutes followed by either A, P, AM, or …

Member Avatar for wolfson109
0
311
Member Avatar for Alyboi

[code]#include "stdafx.h" #include <iostream> #include <string> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { const int Grade1 = 0 ; 29; const int Grade2 = 30 ; 39; const int Grade3 = 40 ; 69; const int Grade4 = 70 ; 100; int Grade ; int i = 0 …

Member Avatar for Red Goose
-1
125
Member Avatar for kdcorp87

[CODE]FileInfo[] Images; Images = Folder.GetFiles("Image Files (JPEG,GIF,BMP)|*.jpg;*.jpeg;*.gif;*.bmp|JPEG Files(*.jpg;*.jpeg)|*.jpg;*.jpeg|GIF Files(*.gif)|*.gif|BMP Files(*.bmp)|*.bmp|All Files|*.*", SearchOption.AllDirectories);[/CODE] getting error here [B]An unhandled exception of type 'System.ArgumentException' occurred in mscorlib.dll Additional information: Illegal characters in path.[/B] completely confused because it works nice in other app. what i m missing? help

Member Avatar for kvprajapati
0
156
Member Avatar for thecstudent

Hello to everyone! or should I say, "Hello World"? I am new to C and new to this forum, and this is my first post. I wrote a simple C program which I called: isitprime.c and generated [B]isitprime.exe[/B]. I can call this program [B]isitprime.exe[/B] from the command line with an …

Member Avatar for thecstudent
0
309
Member Avatar for moroccanplaya

my program creates a file then copies a file into the file created then i can copy another file into the file created turning it into one bog file i am having troubles when coming to extracting the exact file, can anyone suggest anything on how about to achieving this.? …

Member Avatar for Narue
0
285
Member Avatar for sidrules1984

int a=10,b; b=(a>=5)?b=100:b=200; printf("%d",b) why does the output shows as 200? Plz explain

Member Avatar for Narue
0
111
Member Avatar for ethanbuckley

I have created a music player that is yet to function to its full ( the add button on my main form1 won't bring up the AddNewWaveTrack_form ). These errors vary so any help is much appreciated as I want to learn fast. [CODE]#pragma once #include "AddWaveTrack_form1.h" #include "EditWaveTrack_form1.h" namespace …

Member Avatar for TSims11
0
390
Member Avatar for libathos

hi i want to create a program which will be working like a agenta,meaning a user will fill in a form with an action he wants to perform and the time he must do it and my program should pop up a window which will be trigered by his computer's …

Member Avatar for Ancient Dragon
0
294
Member Avatar for NickPatton

#This is a homework assignment# I need to calculate how many seconds old I am in C. I'm thinking that I can take my birthday as user input and convert it to a date with strptime. I then would like to take the present date and put both it and …

Member Avatar for NickPatton
0
233
Member Avatar for nhes2x

Construct a C program that will accept up to 3 digit integer number and display the hundredth's digit, tenth's digit, and one's digit. Example: Enter integer number (maximum of 3) : 143 Hundredth's place : 1 Tenth's place : 4 One's place : 3

Member Avatar for danholding
-1
157
Member Avatar for TomaCukor

hey guys ive made a project in vs2010 that has a hardcoded (int val; val=800000; in main) amount set at start , the amount is 800000 (800k) i gave it an int type , and it works all well but when i try to run it in the anicent turboc …

Member Avatar for Narue
0
137
Member Avatar for udaykrishnag

to find the size of image by knowing the height and width....and by knowing the pixel depth...any solutions plz help.....

Member Avatar for Trentacle
0
42
Member Avatar for COKEDUDE

This does a nice job of explaining headers. [url]http://www.codeguru.com/forum/showthread.php?t=344569[/url]

0
66
Member Avatar for moroccanplaya

hi if i copy a copy file into another file does it equal 2 files with 2 eof or does it become 1 file ?

Member Avatar for moroccanplaya
0
85
Member Avatar for lionconqueror

Hi, i am working on a project that involves converting 8-bit hex numbers into integer. Firt, I have to say that my hex number is not a number right now, it is only a bunch of characters. for example: int d; char code[9]; code="FFFFFF01"; d=strtol(code,NULL,16); when I try to printf …

Member Avatar for lionconqueror
0
371
Member Avatar for Ali5152

i am new to programming............i just want to create a linked list program plz check for error for me [code] #include<stdio.h> #include<conio.h> #include<malloc.h> void insertAtEnd(int no); void insertAtBegin(int no); void insertAtPos(int no,int pos); template <span= id="IL_AD" class="IL_AD">Display</span>(); <span id="IL_AD5" class="IL_AD">struct</span> LinkedList { int num; struct LinkedList *next; }; typedef struct …

Member Avatar for NP-complete
-2
389
Member Avatar for zeke188

hello i know that to sav i have to write someting like this [code] if (saveFileDialog1.ShowDialog() == DialogResult.OK) { StreamWriter sw = new StreamWriter(saveFileDialog1.FileName); sw.WriteLine(this.textBox2.Text); sw.Close(); } [/code] how would i go about saving more than like 5 textboxes and other stuff like pictureboxes. do i manually enter the picture …

0
48
Member Avatar for malli123

Hi, I need to write a program to open a file in usb mass storage devive(pendrive) without using mount point.I used libusb API to open the device but how to open a file in that without knowing the mount point.Any API functions are there to open text file in that? …

0
56
Member Avatar for Rahuldg

Hello.. i am facing the problem in dynamic allocation to read the data in structure. here is the code. typedef struct { short int fft; short int diff; }symbol; typedef struct { symbol detail; float RE[]; float IMG[]; }receive; fun() { float a[fft_size],b[fft_size]; //here i am allocating the memory for …

Member Avatar for myk45
0
111
Member Avatar for macaela

Hi i need to make a C# windows application that displays “Conway’sGameOf Life” game of life. you can find a history of the game online. does anyone know what sort of tutorials should i be looking to be able to complete this project my knowledge on c sharp is 1 …

Member Avatar for kvprajapati
0
52
Member Avatar for anthonyjpv

Im a newbie and im working with 4 forms, first form is a main menu which has 6 buttons, if one of the button is clicked, a view only form is shown. this view only form has add edit and delete buttons. if edit or add is clicked, a single …

Member Avatar for kvprajapati
0
274
Member Avatar for Celtrix

That had a string delimiter that you could specify. It would be quite useful if you guys could help me remember. It might have been fscanf or might have been a c++ function.

Member Avatar for Celtrix
0
99
Member Avatar for dophine

Hi All, I just read the book called "C++ coding stardards - 101 rules". And Found there is something I don't understand. [CODE]class FlagNth { public: FlagNth( size_t n ) : current_(0), n_(n) {} // evaluate to true if and only if this is the n-th invocation template<typename T> bool …

Member Avatar for dophine
0
123
Member Avatar for Eddiebauer
Member Avatar for Eddiebauer
0
194
Member Avatar for moroccanplaya

i get a undefined reference to get_menu_choice error message but i dont know why ? [CODE] int get_menu_choice( void); int main() { //code// while (choice != QUIT) { choice = get_menu_choice(); if (choice == 1) //code// } else if (choice == 2) //code// } if (choice == 3){ puts("you chose …

Member Avatar for gerard4143
0
165
Member Avatar for luke1705

I'm working on a program to score a bowling game. Right now, my terminal says that my program has a seg fault, but I can't tell where. Any other insight on how to help my program do what it's supposed to do would be helpful. I'm still not sure how …

Member Avatar for mfaisalm
0
96
Member Avatar for Chair

Hi, I've been searching all over trying to find an answer to my problem about reading/writing text files. I saw this very old post/code snippet and am wondering if you could help me with my own: How about if I have this input file: 39882 M 7:45 18:16 10 hours …

Member Avatar for vinayakgarg
0
94
Member Avatar for GobanToba

OK, I was working on a project where I needed to randomly generate tens of thousands of 1s and 0s. I started noticing it didn't seem very random. To test it out I created an array of 458752 (896x512) ints. Then, I tested by seeing how many 1s were generated. …

Member Avatar for Zjarek
0
163
Member Avatar for zachman1094

Hey everyone, I've got a question about something called struct tm. I'm not really even sure if it is a string, array, or what, otherwise I would've said that instead of 'something'. I need to know how to use it. I've been searching the internet for the past hour, and …

Member Avatar for Ancient Dragon
0
4K
Member Avatar for fka

I have a problem. I wrote: [CODE] for(i=0; i<n; i++) { m++; char **exP = realloc(exParam, m*sizeof(*exParam)); char **exT = realloc(exText, m*sizeof(*exText)); exParam = exP; exText = exT; explode = strtok(lines[i], "#"); while(explode != NULL) { exParam[m-1] = malloc(strlen(explode+1)); strcpy(exParam[m-1], lines[i]); exText[m-1] = malloc(strlen(explode+1)); strcpy(exText[m-1], explode); explode = strtok(NULL, "#"); …

Member Avatar for Narue
0
179
Member Avatar for dsit86

hi i need to write a program that connects to a device through Ethernet over the UDP protocal and get the data sent by the device. I tried using the .NET udp client methods but was unsuccessful. Can you guys help...this is my code.... [CODE] static void Main(string[] args) { …

0
114
Member Avatar for jelita31
Member Avatar for Ancient Dragon
0
39
Member Avatar for fuzzyrose

hiiiiiii all I need help to know what are equivalent libraries in c# for those in java--> 1)import java.sql.ResultSet; 2)import java.sql.Statement; 3)import java.util.Vector; 4)import java.util.Hashtable; 5)import javax.servlet.http.HttpSession; 6)import java.sql.SQLException; 7)import org.apache.velocity.Template; 8)import java.sql.Connection; Thanks In advance :)

Member Avatar for fuzzyrose
0
172
Member Avatar for udaykrishnag

the given input as image.....later we have to find which is the storage format like 4:4:4 or 4:2:2 or 4:2:0.... any suggestions plz.....in C

Member Avatar for myk45
0
26
Member Avatar for Benkyou

I was finally able to get the html code from web pages. Just to face another problem! Now I have to extract all the hyper links from the html, i was trying to do this with strtok.. no luck at all. Is there any other function that can help me …

Member Avatar for WaltP
0
47
Member Avatar for wert21

Good day! we have an exercise on how to create a list but i do not know how to do it without an algorithm. Can you help on what is the algorithm to create a linked list?

Member Avatar for vinayakgarg
0
86
Member Avatar for gth759k

About a year ago, I built a simple ray tracer in Java, and now I'm trying to port it to c++, but I can't figure out how to get a couple of my classes to work together. It should be fairly strait forward, but its not working. Here is a …

Member Avatar for gerard4143
0
3K
Member Avatar for Badoodhi
Member Avatar for Don_k

Dear guyz, I am creating a file archiver/extractor(like tar), using POSIX API system calls in C. I have done part of the archiving bit. I would like to know if any one could help me with some C source code(using above) to create [B]a file header for a file in …

Member Avatar for Don_k
0
291
Member Avatar for fab2

Hi, I have started to study the C language, and as anyone, problems are on. I am having problems with the for comand for; I do apologise if I am not using the CODE and the ICODE correctly. here an example: [code] #include<stdio.h> int main() { int i; int b; …

Member Avatar for fab2
0
115

The End.