15,551 Topics

Member Avatar for
Member Avatar for SpyrosMet

Hey everyone. I have a problem with 2 strings i need to compare. My code is the following [CODE] if((*(fixedparkpnt)).name == pname) { //do stuff }[/CODE] I am trying to make a search proceedure based on a name given by the user but the condition is always false. I have …

Member Avatar for Agnusmaximus
0
1K
Member Avatar for a-humam

[COLOR="Red"]Hello All Would you plz tell me how I can force a process to sleep for a specific period? i.e. I need an instruction similar to (Thread.sleep) Regards.[/COLOR]

Member Avatar for a-humam
0
89
Member Avatar for greenman78

I would like to achieve a speedup for this program. I was wondering how to get started. I was thinking of maybe using pointers. Any hints would be great. [CODE]void test() { int i, j, k; for (i=0; i<N; i++) { for (j=0; j<N; j++) { for (k=0; k<N; k++) …

Member Avatar for stokes1900
0
107
Member Avatar for chrishtones

Since __uuidof is a C++ only operator, how would I retrieve the GUID of an object in C?

Member Avatar for gerard4143
0
625
Member Avatar for writt

what is the best way to read a file format as below: titleone 5 jim john brian george bill titletwo 5 abc qwe zxc asd etrwe titlethree 5 lkj mnb oio uyu trwww titlefour 5 dfg lksjdf alskdj oipopi iuiuy Need to create a dynamic 2d array with title as …

Member Avatar for writt
0
233
Member Avatar for ritesh2190

I need to write a c program which takes a algorithm as the input and gives the equivalent c source code as the output.any ideas????

Member Avatar for Anuradha Mandal
-1
4K
Member Avatar for markfisher

Hi I'm trying to create application using C and GDI. I want my EXE file to have an ICON, so I created .bmp file (64x64) and added to resource file. Then I created HICON hIcon using that bitmap image (CreateIconIndirect(...)) Now my problem is, .EXE file still has the default …

Member Avatar for venomxxl
0
214
Member Avatar for george_82

Hi All, I need to format my USB memory card using C code .But i don't want to call any system commands for that .And the process should not throw any confirmation window like " Are you sure Y/N".Plz help...

Member Avatar for Ancient Dragon
0
110
Member Avatar for nk28

Hey all; I need to know the memory layout in detail of a c program. Since I have been unable to find out in google the exact things that I want to know I am going to write them here. Please correct whichever is wrong. Thanxxx Assuming a stack going …

Member Avatar for gerard4143
0
177
Member Avatar for achieve_goals

Hi, I have to create a structure for student record and save their data, but I am having trouble in storing that data. This is what I have: [CODE] struct student { char id[7]; char firstname[20], lastname[20]; char phoneno[15]; char address[100]; dobtype dateofbirth; }; int main(int argc, char *argv[]) { …

Member Avatar for Ancient Dragon
0
240
Member Avatar for vinitmittal2008

[B]Hello Friends.. I need suggestions to make my this program better...[/B] [COLOR="Red"][B]Implementation of a STACK(containing names) as an array, with its basic operations PUSH,POP & SHOW[/B]..[/COLOR] [CODE] # include <stdio.h> # include <conio.h> # include <string.h> # include <process.h> # define STACKSIZE 5 typedef struct{ int size; char names[STACKSIZE][20]; }STACK; …

Member Avatar for Ancient Dragon
0
202
Member Avatar for jothi lakshmi
Member Avatar for gahhon

[CODE]void List_Student_Details() { FILE * output_list; output_list = fopen("StudentDetails.txt", "r"); if(!output_list) { system("cls"); printf("This File Cannot Be Open Successfully!!\n"); printf("Please Check It!!\n"); exit(-1); } else { system("cls"); printf("\n"); printf("************************ STUDENT DETAILS ************************\n"); printf("\n"); i = 0; while((fscanf(output_list,"%[^|]", &Summary[i].studNo)) != EOF) { fscanf(output_list, "%[^|]", &Student[i].regNo.year, &Student[i].regNo.campus, &Student[i].regNo.school, &Student[i].regNo.level, &Student[i].regNo.serial_number); fscanf(output_list, "%[^|]", …

Member Avatar for gahhon
-1
116
Member Avatar for Unidennn

Hi, i keep getting a segmentation fault and i cannot figure where the problem is, well the problem is in the while loop but not sure what is wrong with it. Question is enter a line of words with spaces then tokenize them and print in reverse. Here is the …

Member Avatar for Ancient Dragon
0
127
Member Avatar for manofhouse

This is the Header file [CODE]#ifndef STUDENT_H #define STUDENT_H // class Student definition class Student { public: Student( char *nPtr ); ~Student(); void displayGrades() const; Student addGrade( int ); static int getNumStudents(); private: int *grades; char *name; int numGrades; int idNum; static int numStudents; }; // end class Student #endif …

Member Avatar for thelamb
0
377
Member Avatar for atramposch

So does this code adequately satisfy this question? Write a function named tokenize() that will receive the following parameters: a char * to the string to tokenize, and a char * [] that will receive pointers to all of the tokens generated, in their order of generation. The function will …

Member Avatar for Ancient Dragon
0
87
Member Avatar for Joey_Brown

Hello I have a question regarding this program in c. My assignement is as follows : *read the angle in degrees *convert that angle in radians *Apply the formula for calculating cosine function with factorials *Then, automate the above calculating procedure by using loops *Afterwords calculate the absolute error between …

Member Avatar for Joey_Brown
0
122
Member Avatar for gahhon
Member Avatar for cppgangster

Hi sorry posting as a threat here, but i cound find any other relevant secion. I have learned c++ and i want to lear c languege, and I want find good book to lear from. could anyone recommend one please? thank you

Member Avatar for JDevelop
0
169
Member Avatar for JDevelop

Dear all, First of all I must say that I have just started with C. I've been doing some Java and C# as well but not very much of them too. In my new course of C, which goes on much rapidly than one can catch something, I am given …

Member Avatar for JDevelop
0
320
Member Avatar for YuriR

I'm having issues with this checkbook program. The probelm is when I deposit money into the balance it still shows me the old overdrafted balance. I am thinking that it has to do with my: [CODE]bal += CreditDebit;[/CODE] Here is my code so far: [CODE]#include <stdio.h> #include <stdlib.h> int main …

Member Avatar for WaltP
0
126
Member Avatar for Caeon

This is what my program is supposed to do: [LIST=1] [*]Print the vector (m1) [*]Print the matrix (m2) [*]Multiply the vector and matrix together and display results [/LIST] The only thing wrong with my program is that I can't quite get the right results displayed. The correct display of values …

Member Avatar for Caeon
0
12K
Member Avatar for skiabox

I am trying to use a vla (variable length array) in my code but I see that the array is not initialized properly when I debug the program. Here's the code : [code] #include <stdio.h> #include <stdbool.h> int main (int argc, const char * argv[]) { // insert code here... …

Member Avatar for skiabox
0
136
Member Avatar for poojabi

hey this week my assignment is like this write functions for inserting and deleting elements for an ascending priority queue .implement as un unordered list and an ordered list. as usual our teacher told us to read about priority queue from any good book.i have very vague idea about priority …

Member Avatar for group256
0
124
Member Avatar for blogoot
Member Avatar for gerard4143
0
133
Member Avatar for SpyrosMet

Hi everybody. I need to pass the value of a pointer to a struct for a server program to a client program. my code is the following for the server: [CODE] write(ns, &fixedparkpnt, sizeof(fixedparkpnt)); write(ns, &fixeddriverpnt, sizeof(fixeddriverpnt));[/CODE] and for the client: [CODE] read(sock2, &fixedparkpnt, sizeof(fixedparkpnt)); read(sock2, &fixeddriverpnt, sizeof(fixeddriverpnt)); [/CODE] sock2 …

Member Avatar for SpyrosMet
0
147
Member Avatar for kapilsolanki84

if u want to invoke the gnuplot with c then your code should be in this pattern. [CODE]FILE*gnuplot; gnuplot= popen("E:\\gp442win32\\gnuplot\\binary\\gnuplot -persist","w"); fprintf(gnuplot,"plot 'output.DAT'\n"); fprintf(gnuplot,"set title 'Po(db) v/s step/(km)'\n"); fprintf(gnuplot,"set xlabel 'step(km)'\n"); fprintf(gnuplot,"set ylabel 'Po(db)'\n"); fflush(gnuplot); close(gnuplot);[/CODE]

Member Avatar for progneer.soft
0
79
Member Avatar for MK1985

Hi All, In c programming we get [B]Debug assertion failed application error[/B] when we use malloc() and free() functions so anyone know about this error..? and why we get this error..? Thanks

Member Avatar for Ancient Dragon
0
98
Member Avatar for BLUEC0RE

I have numbers represented as chars (eg. '11.27') I want to type cast it to a double but im getting "pointer value used where a floating point value was expected". Any ideas?

Member Avatar for BLUEC0RE
0
68
Member Avatar for nonshatter

Hi all, I have virtually no knowledge of C, but I have a problem with one of my scripts. It runs fine on a 64-bit Linux machine, yet it gives me a seg fault when run on 32-bit linux. gdb tells me that the seg fault occurs on line 314. …

Member Avatar for mitrmkar
0
113

The End.