19,876 Topics

Member Avatar for
Member Avatar for yuzhang

Hello All: I have been thinking to learn develop a GUI using C++. Any suggestions on where to start? (Using which development kits and etc) Thank you

Member Avatar for maddog39
0
87
Member Avatar for edouard89

Hello All, well this is my first post after a while of inactivity. I have run into a problem. I have an assignment for school, but when I debug my program using Dev C++(BloodShed) it give me a segmentation fault. I am reading from a file that looks like this: …

Member Avatar for edouard89
0
154
Member Avatar for devilofangel

i am new at programming basic.. i got this problem at school... i want to seek help from you!..its all about inserting and deleting arrays in c language!.. for example: given this output: Menu Operations: [1]Insert at beginning [2]Insert at middle [3]Insert at End [4]Show array elements [5]Delete array elements …

Member Avatar for jwenting
0
85
Member Avatar for dammest
Member Avatar for dammest

Implement the filters: longLines, linesWith. The filters have similar structure. They accept one parameter from the command line (length limit or a string of characters) and then read, one by one, all lines from the standard input. Each line is tested. The only difference consists in different functions used to …

Member Avatar for WaltP
0
113
Member Avatar for dammest
Member Avatar for cs378

Hi I am programming in Unix. My task is really simple, but I don't know and where to debug this problem. My C program opens up the "ls" manual and makes an exact copy to a new file. However my program stops/freezes in the middle of read. (It works fine …

Member Avatar for Ancient Dragon
0
123
Member Avatar for jasssvj

Hi! I have to make a program, wich lists all files in current dir, and then save all file names into an array. My program doesn't work ! Can you tell me why? Thanks a lot:)[code=c] #include <dirent.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <dirent.h> int main(void) { FILE …

Member Avatar for WaltP
0
246
Member Avatar for rxylion

[B]Well As What I Have Expected There You Are Again![/B] actually id like to ask if ever you could give me a very simple Array program. I read books but i wanted to have other simple situations about using array.

Member Avatar for Aia
0
92
Member Avatar for controlsi

This code is suppose to read from an inputed file and then fill and array and sort the student records with in that file. Im having alot of trouble debugging myself and this program is due with in two days. the input will look like lastname, firstname grade ssn birthday …

Member Avatar for Aia
0
90
Member Avatar for controlsi

Hello, well this portion of code is basically just the structures from the program. everytime i compile the program i get an error at the INFOstructure. i am using these structure in a program that read from a file and prints the data to the screen. my problem is that …

Member Avatar for controlsi
1
85
Member Avatar for ppallavi

Hi , Inside a recursive function i have a static variable, when i return that static variable , it's value becomes zero. count = trimWS(someXMLNode); i get count as 0 , but when i debug countWS was 9. Pls help me why this is happening and what is the right …

Member Avatar for ppallavi
0
86
Member Avatar for dsuh06

for the for loop for ( ; *source!='\0'; source++) what is the purpose of the semicolon in the for loop ? thank you!

Member Avatar for Ancient Dragon
0
108
Member Avatar for stilllearning

Hello, I looked for this on the forums, and found an invalid link to a tutorial. But I'd appreciate it very much if someone can point me to a tutorial on hash tables, that includes a basic implementation in C or C++. Thanks a lot.

Member Avatar for stilllearning
0
150
Member Avatar for zandiago

Good day. My semester of c++ is coming to an end. I've got to complete a total of 7 assignments within the next 3 weeks. I've completed 5 out of the seven. I've got two left (1 has a separate thread by itself). So you can also take a look …

Member Avatar for zandiago
0
979
Member Avatar for Barefootsanders

Hey everyone, I was wondering if someone could explain to me the following bit of code. I understand != in logic but i dont know how to read it like this: [CODE] float y = 0.01, x = 0.005, z; z = 2 * x + (y != 0.001); [/CODE] …

Member Avatar for Aia
0
113
Member Avatar for pupu14

can anyone give a code for cpu scheduling algorithm for FCFS, SRTF and PRIORITY please it to my <snip email> tnx..

Member Avatar for ithelp
-1
89
Member Avatar for mmonaco27

I'm implementing a heapsort on a void array. But I'm having trouble with line 6: [code=c]void siftdown(char *start, char *end, size_t size) { char *curr = start; char *child; while (curr*2 + size <= end)[/code] I cast the pointers to char because they have a length of one, and I …

Member Avatar for mmonaco27
0
298
Member Avatar for ravina_malik
Member Avatar for Oreynid

Hello all, I've tried reading back threads and the various posted tutorials, etc that here and I've not stumbled upon the answer I'm looking for. I am attempting to write a hangman game as a school project, and I am having trouble getting just one character from the input stream. …

Member Avatar for Salem
0
10K
Member Avatar for sivaslieko++

I read two binary numbers which are separeted by a coma(1010,1000111) from a texfile into two differen linkedlist as below: [code] while (!feof(fout)) { ch=fgetc(fout); if(ch==','){ printf("\n"); control=1; }else{ if(control==0){ if(ch=='1' || ch=='0'){ curr = (item *)malloc(sizeof(item)); curr->val = ch; curr->next = head; head = curr; length1++; } }else{ if(!feof(fout)){ …

Member Avatar for danzona
0
106
Member Avatar for bigt2008

[B]so foar I've done this much[/B] using namespace std; int main() { //1.Declares an input stream variable named inFile ifstream inFile; //2.Opens "indata.txt" inFile.open("indata.txt"); //3. If input file was not opened Prints "Input file not found" if (inFile.fail()) { cout << "Could not open file!" << endl; return 1; } …

Member Avatar for Lerner
0
90
Member Avatar for tat2dlady

Does anyone know basic pseudocode for a balanced k-way sort-merge? Thanks for any info you may have.

Member Avatar for WaltP
0
419
Member Avatar for sathishkumar.e

Hi, I'm a newbie to this group. I heard a question in C to swap the two strings using command line arguments but without using the temp. string,pointer or array Can anyone help me how to do this.

Member Avatar for Duoas
0
134
Member Avatar for Barefootsanders

I have a doubly linked list and I know it gets created with the proper values. For some reason when I run through my print function it, only prints 1/2 of the list and then gives me this: the instruction at "0x7c93426d" referenced memory at "0x00000000". the memory could not …

Member Avatar for Barefootsanders
0
95
Member Avatar for rajeev_028
Member Avatar for pedro martinez

How can I create a C program to delete the internet explorer history file? How can I create a path?

Member Avatar for WaltP
0
92
Member Avatar for boyz

can any one write a c program in which both the if and else statements should execute???

Member Avatar for WaltP
0
119
Member Avatar for johnnyjohn20

Hi, Would anybody know a way to repeat a program, for example the user has reached the end and a prompt is shown on screen Would you like to try again? Press y, n. I have managed to do this using goto command but this as ive read is a …

Member Avatar for WaltP
0
274
Member Avatar for CaitlynCraft

Hello fellow coders! I am kind of stuck on one aspect of a project that I am currently working on. I have a code for a number guessing game in "C" but I need some assistance as to how to add a "high score" feature to the game. Basically, I …

Member Avatar for WaltP
1
1K
Member Avatar for e1fjl

Right, I am attempting to parse a DNS reply, an IPv6 one specifically. The ip is split up into its segments with two bytes used to represent each segment. I have a pointer to the data, currently an unsigned char *c. I have tried simply setting an int to equal …

Member Avatar for e1fjl
0
105
Member Avatar for Barefootsanders

Hey everyone, I'm attempting to write a program that will contain multiple C-DLLs. I currently have 2 structs: [CODE] struct CDLL_Node { char value[30]; struct CDLL_Node *next; struct CDLL_Node *prev; }; typedef struct CDLL_Node node; struct listHolderRecord { char label[30]; struct listHolderRecord *next; node *headAddr; }; typedef struct listHolderRecord listHolder; …

Member Avatar for Barefootsanders
0
93
Member Avatar for zandiago

Good day. I would like some suggestions/recommendations as to what type of project i could do...so basically you guys get to assume the role of a professor...here it goes: Write a program that uses an array of structures. lt can be on any topic or subject you wish to choose. …

Member Avatar for zandiago
0
561
Member Avatar for marzuki

Dear all; I want to sort and class the random data by using C programming. The below are example of th data: Diameter Velocity 0.05 1.0 0.05 1.2 0.15 2.2 0.05 1.2 0.25 3.1 0.35 4.3 0.25 3.1 0.35 4.3 0.45 5.7 0.15 2.2 0.15 2.0 I want to get …

Member Avatar for Ancient Dragon
0
85
Member Avatar for matt nagel

Hi there, I am fairly new to programming and trying create a program to parse csv data into an array. I have been following an example I found on this site but I am running into a segmentation fault (even if I copy code directly). I am fairly sure the …

Member Avatar for Duoas
0
7K
Member Avatar for dsuh06

what does the following do? int array[6] = { 5, 3, 4, 17, 22, 19 }; int* ptr = array[0] *ptr = -1; thank you!

Member Avatar for Ancient Dragon
0
116
Member Avatar for camberos

ok i hope someone can helpme i need display a menu like a presentation page Name Adress Phone using assambly code, but when i put asm{ name db 'homer simpson','$' adress db 'everygreen','$' phone db '555-555', ..... mark unknow assambly code name db ...... I using TC but i need …

Member Avatar for camberos
0
95
Member Avatar for MardukLitzer

Hello All, I'm having difficulty detecting the 'LVN_COLUMNCLICK' message from a ListView control. I am entering the WM_NOTIFY for sure, but I can't trap the LVN_COLUMNCLICK. Not sure where else to look, my code seems to follow what is listed on MSDN and just about every snippet I've found. Any …

Member Avatar for Ancient Dragon
0
116
Member Avatar for Nemes

Hello, I am running a heuristic search algorithm (running on Windows XP), and at each iteration, I want to write results in an output file. The issue that I have is that after a number of iteration, my program crashes at the line where I have the "fputs(str, f);" (See …

Member Avatar for Ancient Dragon
0
482
Member Avatar for controlsi

[Code=C] #include <stdio.h> #include <stdlib.h> #define SIZE 5 #define MAX 10 void fillArray(char arr[][MAX]); void printArray(char arr[][MAX]); int fileOpen(void); int main(void) { char arr[SIZE][MAX]; int success; fileOpen(); if (success == 1) { fillArray(arr); printArray(arr); } else printf("File access failed"); return 0; } int fileOpen(void) // ** this were i am …

Member Avatar for WaltP
0
132
Member Avatar for asilter

i have 2 executable files. From one of them i'm calling the other one. it is also executed correctly, but does not return 0. why? backup.c file : [CODE] #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/time.h> #include <unistd.h> #include <mysql/mysql.h> int main(int argc, char * argv[]) { if(!execl("/home/user1/exec_work/binary","/home/user1/exec_work/binary","serdar","ilter",NULL)) { …

Member Avatar for Duoas
0
118
Member Avatar for johny112

Im trying to write the programme for the following question, and im really struggliing. I will be reaaly thankful if someone can give me some tips or a programme for this. I would also like to point that im new to programming and this website so please give me some …

Member Avatar for johny112
0
103
Member Avatar for mank

I want to parse a tree the tree is like (((1,2)3,4)5,6) see the attached parse tree the program would produce an array from root to each leaf [URL=http://allyoucanupload.webshots.com/v/2002642992068581724][IMG]http://aycu25.webshots.com/image/35944/2002642992068581724_th.jpg[/IMG][/URL] So I would like to have 4 arrays [CODE] a[]={5,3,1} b[]={5,3,2} c[]={5,4} d[]={6} [/CODE] I would like to have a general format …

Member Avatar for Narue
0
108
Member Avatar for funkyjohny

Can anybody do this; The algorithm of Chang and Roberts achieve the 0(NlogN) (N the number of nodes) complexity of messages in the medium case, but at worst however it achieves 0(n^2). The algorithm of Peterson of/Dolev-Klawe-Rodeh achieves complexity of messages the O(NlogN) at worst situation improving the algorithm of …

Member Avatar for Salem
0
156
Member Avatar for r5ingh

Hello, i'm a noob C programmer, learning it at university. We have been given an assessment which i need to complete asap. I have figured out the solution to the porgram (almost) but need some assistace. I have a Java and VB background and i cannot seem to get my …

Member Avatar for r5ingh
0
475
Member Avatar for iamconfused

[U]Hello...[/U] First of all hello to everyone... this is my first post. I did some 'googling' for help with C code and found this place, the reason I need help is because I am working on a (what I consider hard) project and (only) a week and a half to …

Member Avatar for iamconfused
0
219
Member Avatar for deitystrife

I have finished an entire program but there is one small problem with a bit of error trapping. [code] while((((payment/.01)-(floor(payment/.01)))>0.0) || (payment<0.0)) { printf("You can't pay with fractions of one cent! You can't pay with negative amounts! Please type in your payment "); scanf("%f", &payment); }[/code] In this little bit …

Member Avatar for Duoas
0
92
Member Avatar for adikesan

Hi I want to know about the use of linked list in C and also about its working and syntax. Please tell me about this.

Member Avatar for rajusankar28
0
125
Member Avatar for enuff4life

in my function OpenData, it corrupts error on memory allocation when I compile and run it. in main, i need to creat an int array and pass it to other function lator.. I take 4 command-line arguments ie, a.out 7 100 lychrels.dat 7 is seed number 100 is number of …

Member Avatar for enuff4life
1
181
Member Avatar for tootypegs

Hi basically i have a program that gets a handle on a USB device lusing '\\\\?\\e:' but i want to be able to get a handle on it using its device instance id 'STORAGE\REMOVABLEMEDIA\7&324ACC50&0&RM:' How do i impliment this, i have tried the following below and it just doesnt work …

Member Avatar for tootypegs
0
105

The End.