19,876 Topics

Member Avatar for
Member Avatar for vk10

Hi, I am new to C++.Pls help me out.would really appreciate it. The problem goes like this. There are two files. In file1(say data1.txt)u have got something like this Line1:Hello How Line2:We are fine the work is grab each string and assign it with a binary file and enter it …

Member Avatar for vk10
0
106
Member Avatar for charusood

You will need to author two classes – Customer and Pensioner. Pensioner should be a subclass of Customer. These classes should be in their own files with separate header files. Details are below. Create a third class called Manager. The manager file can contain the main function. The Manager class …

Member Avatar for Lerner
0
289
Member Avatar for botter911

I am trying to load the bmp image from my C to the console and it works. The image opens. But the problem now is the console hangs. Is there something wrong in my code? Or what should I change to avoid making the console hang. [CODE] #include <stdio.h> #include …

Member Avatar for twomers
0
183
Member Avatar for AutoC

Hi, Whenever a user types ./a.out with the wrong number of arguments I want my program to output something like Usage: ./a.out <-e/-d> <FIlename> <Value> how can I do this?

Member Avatar for Nick Evan
0
88
Member Avatar for programmergirl

I'm to this whole modularity thing. We were asked to do our own libraries .h and .c files and to call them in main. The main objective of the program is to compare bubble and select sort. So far, I have all the libraries along with their respective .c files. …

Member Avatar for Sci@phy
0
276
Member Avatar for Dave Sinkula

ESR is blogging again: [url]http://esr.ibiblio.org/?p=532[/url] [edit]And don't skip the comments.

0
85
Member Avatar for Avaleriona

Thanks [CODE]#include <stdio.h> #include <stdlib.h> struct Node{ int data; Node *link; }; typedef Node* NodePtr; void addToEnd(NodePtr* head, int val); void printList(NodePtr head); NodePtr mergeLists(NodePtr* list1, NodePtr* list2); int main() { int nextInt; NodePtr list1 = NULL; NodePtr list2 = NULL; printf( "Enter integers in sorted order for first list, …

Member Avatar for Ancient Dragon
-1
142
Member Avatar for zzmgd6

help. I do everything in C++ with STL but I have to utilitize legacy C functions within my member functions (methods). The legacy C function signature is... extern int UF_DRF_create_label( int num_lines_text, [B]char text_string[ ][132+1][/B] , double origin_3d[3], UF_DRF_leader_attach_type_t leader_attach_type, UF_DRF_object_p_t object, double model_pos_3d[ 3 ], tag_t * label_tag); My …

Member Avatar for zzmgd6
0
204
Member Avatar for botter911

I have made a function that detects F1 key at the end of the program and starts it again. But what I wanted was that even if user is in the middle of the program when the user presses F1 it immediately restarts the program. Here is my code: [code] …

Member Avatar for botter911
0
115
Member Avatar for nachon

Hi Everyone. I'm kind of new. For some weeks I've been studying cpp using devcpp and it worked just fine. I changed my PC and now I am trying to program in Builder c++. I am reading a Builer tutorial and Im doing OK with the frames and all of …

Member Avatar for nachon
0
146
Member Avatar for JONZ

Can anyone fix my code especially in the updateRecord function because instead of updating,data remains the same. [CODE]int newRecord( FILE *fPtr ) { /* create clientData with default information */ struct clientData client = { 0, "", "", 0.0 }; int accountNum; /* account number */ /* obtain number of …

Member Avatar for Ancient Dragon
0
111
Member Avatar for mauro21pl

Hi guys I have a small problem. It could be not enough information to obtain the right answer but I will try. So I have a problem regarding liked lists. It works perfectly fine when is compliled under Windows using Dev-C++ compileer. But when I try to complile under Unix …

Member Avatar for stilllearning
0
87
Member Avatar for deepugtm

I want to use getimage function to store the image in memory but cant ,please help me

Member Avatar for Narue
0
69
Member Avatar for deepugtm

I want to write some programs and even games using graphics of C.Please Help me to write these.

Member Avatar for Narue
0
159
Member Avatar for ahamed101

Hi everyone, Need a small help. I need to read the data from stdin (standard input) without hitting enter. Need to read the data as in and when they are typed in until EOF (CTRL + D as I am using UNIX) is encountered. I tried, getc() - requires ENTER …

Member Avatar for ahamed101
0
491
Member Avatar for xcyrus_tan_rx

pls help me with my code! it wont align! T_T i cant get it to work correctly! pls help guys! heres the screenshot! the date wont align huhu! [IMG]http://img72.imageshack.us/img72/4647/helprk3.jpg[/IMG] [code] #include<stdio.h> #include<string.h> #include<conio.h> int getNumberOfDays(int month,int year) { switch(month) { case 1 : return(31); case 2 : if(year%4==0) return(29); else …

Member Avatar for xcyrus_tan_rx
0
147
Member Avatar for plike922

I need help with program i cant find a way to get rid of the error and if i think a little bit more my head will explode this is a 2day program for me [CODE]#include <iostream> #include <stdio.h> #include "simpio.h" #include "strlib.h" #include "random.h" #include "string.h" using namespace std; …

Member Avatar for rpiper138
0
83
Member Avatar for JONZ

Can anyone help me make a pseudocode for this function....cause its really difficult:'( [CODE]int updateRecord( FILE *fPtr ) { int account; /* account number */ double transaction; /* transaction amount */ /* create clientData with no information */ struct clientData c = { 0, "", "", 0.0 }; /* obtain …

Member Avatar for rpiper138
0
175
Member Avatar for ashkash

I am trying to write some information out to a file. I have a string in hex values and I need to write this out to the output file. The hex string I have is 4b70 4772 64. The string equivalent is KpGrd. I have: char a[] = "4b7047726400"; Then …

Member Avatar for ArkM
0
97
Member Avatar for Mumo

can anyone show me how to go about this. I've been trying to use a log to base 2 in c. the code atually works but it requires me to type in a char after typing the number i'm getting the log of [code=c] #include<stdio.h> #include<limits.h> #include<math.h> void main() { …

Member Avatar for ArkM
0
99
Member Avatar for Avaleriona

Write a program that inputs a line of text and uses stack object to print the line reversed. I found this C question in: [url]http://abhaygoel.wordpress.com/c-dac-ent[/url]... I have difficulty to solve it, anyone can help!

Member Avatar for Narue
0
173
Member Avatar for Seba Sama

Hi everyone! I'm kinda n00b in C/C++, All I ever did were some basic programs for some .txt files manipulation. Last time I was working in BC 3.1, about for years ago. Now I got Borland Turbo C++ Explorer 2006 and is a little hard for me to start a …

Member Avatar for Sky Diploma
0
153
Member Avatar for cutedipti

what dose the error " Null pointer assignment" means and what causes this error?:idea:

Member Avatar for Ancient Dragon
0
68
Member Avatar for shinta13

I'm completely new to C & need some help =( I want to make this clear.... This is a homework project that I'm stuck on so if you feel this is "cheating" then sorry for "offending" you. How can I change the tax rate in the executable file? This is …

Member Avatar for stilllearning
0
102
Member Avatar for Natrax

learning C++ and going through some codes. I'm puzzled by how the following piece of code works. It's from the msdn library as part of an example, and I know that the code works, but I'm puzzled by how the "%" sign works. [code=cplusplus] #include "stdafx.h" #include <stdio.h> int main …

Member Avatar for Natrax
0
76
Member Avatar for anuj_sharma

Hey Guys, Can anyone tell me hoe to use database connectivity in C or C++. Any web links would be better.

Member Avatar for Salem
0
70
Member Avatar for msundastud

hey guys..I'm trying to teach myself to writee code using C. The program I am working on now is to write a program that prompts a user for his/her age and then prints a message based upon the age range that the user’s age falls into here is the age …

Member Avatar for msundastud
0
64
Member Avatar for Elmo_loves_you

Hi Guys, Im more familiar with coding in C# ... can someone please help me to convert the line highlighted below into VB.NET Much appreciated [code] private int file_count = 0; /// /// Get the file count of a given directory recursively. /// public void GetDirectoryFileCount(string dir) { dir = …

Member Avatar for Jx_Man
0
219
Member Avatar for botter911

I have some simple questions: 1) How can I restart my program immediately. For example, when the user press F12 it will restart immediately even if the program is not complete. 2) In scanf the problem is: for example: Height Width enter the perimeter: 2 3 < the Cursor moves …

Member Avatar for Ancient Dragon
0
249
Member Avatar for sneekula
Member Avatar for Ancient Dragon
0
104
Member Avatar for IrishUpstart

Hi Gang! I am new to the forums, and programming in general, so I apologize forthright if I am slow or just plain dense on anything/everything. With that disclaimer gotten outta the way, I have an assignment and I am not sure what exactly how to execute it. The problem …

Member Avatar for stilllearning
0
652
Member Avatar for flipjoebanana

Hello, I am trying to incorporate the use of a batch file towards my program. For this I just want that after the program has starting running to send the file content's to stdin, in which case the program should do the rest? Is this possible, how so? Or should …

Member Avatar for flipjoebanana
0
161
Member Avatar for ballinloughan

Hi There, I have a piece of code that is confusing me and would appreciate any advice: Reg1 is an 8 bit register Bit0 is bit 0 of Reg1 Line of code that I am having trouble understanding: Reg1 &= ~(1<<Bit0); This is what I think the answer is: Asume …

Member Avatar for ballinloughan
0
109
Member Avatar for cutedipti

h! friends i am not gettin output for below program.. it shows [B]segmentation fault[/B]...:-O can any one suggest me on this.... [code=c] #include<stdio.h> #include<string.h> int main() { char *str1="United"; char *str2="front"; char *str3; str3=strcat(str1,str2); printf("\n%s",str3); return 0; } [/code] thanks:)

Member Avatar for ithelp
0
93
Member Avatar for JONZ

Can anyone add some codes in my program so that it could output a receipt which would display the name of the items bought with their price..:) [CODE]#include<stdio.h> int item_details (); int payment (int x); int add_item (int x); int main () { int choice,price; printf("Enter 1 to buy.\n\n"); printf("Enter …

Member Avatar for Ancient Dragon
0
213
Member Avatar for hervens

Hello I was wandering if anyone knows any good hardware programming tutorials, or books in c++ I'm not a c++ expert, but i feel very comfortable with the language, and read Sam's teach yourself c++ in 24 hours. What i basically want to do, is interresting stuff like, controlling an …

Member Avatar for dougy83
0
350
Member Avatar for cutedipti

H! plz solve a problem..............! See I want to take continuous four input from the user, out of which three are character type and one is of int type. So my problem actually is that, it accepts only three input i.e. 2 char and one int & for remaining char …

Member Avatar for cutedipti
0
111
Member Avatar for balakrishnan.kb

what is the difference between virutual keyword in c++ and final in java

Member Avatar for Alex Edwards
0
110
Member Avatar for melissajohn718

Write, compile and run a C++ program named that reads in one integer that represents a total number of hours and then displays the equivalent number of weeks, days and hours, all properly labeled. Have your program only do the calculation if the user enters a number less than 30,000 …

Member Avatar for Narue
0
182
Member Avatar for Duki

We're trying to get our C# program to work on linux. We just loaded into Mono, and it compiles fine but the form doesn't appear. Anyone know what? Does it have something to do with it being a "windows form"?

Member Avatar for Duki
0
165
Member Avatar for godloverails

Here is a data file like this,please help me update my code to omit all comments stored in the file.sample file looks like this: C:\\s1.txt #author:Single Ray #data:02-2-10 141.641, 567.614, 24.25 140.939, 567.736, 24.25 #start 140.053, 567.947, 24.25 148.985, 568.352, 24.25 #end .... Im sorry,forgot attach my codes,here is my …

Member Avatar for Salem
0
156
Member Avatar for syuk

Hello C program Gurus... i have problem with my programming. i can run my prog but its something not right... my prog is to make an automated reservation system program to assign seats on flight of the plane that have apacity 10 seats. the program should display the following menu …

Member Avatar for Salem
0
146
Member Avatar for juma denice

i require a program that generates random numbers for a dice and should have 1000 observations

Member Avatar for raul15791
0
130
Member Avatar for vibgyor

Hi, I am have trouble in Array of pointers to structure. I have defined as structure. typedef struct { char * name[5]; int number; }mystr; I have defined an array of pointers to this structure.( is this correct ?) mystr (* myptr)[5]; To fill the values, i have to pass …

Member Avatar for Ancient Dragon
0
108
Member Avatar for Hannahlv

Hi, everyone! I'm doing a p2p streaming project. This project is actually about : the server and client will connect first (socket created), after connect then client will receive the IP address of another client from server, then those 2 clients connect together and start streaming. I can write the …

Member Avatar for Hannahlv
0
450
Member Avatar for helixneu

Hi I want to read a two huge integer input from user & wanted to display output on the screen can any one help me ? eg : int a=8132123781237; int b=1237829789; result = a *b ; print(result); ????

Member Avatar for iamthwee
0
92
Member Avatar for Clockowl

Howdy folks, Does anyone know if GCC is capable of creating a fixed length 1D array of an N-Dimensional array for reasons of speed? I've heard it matters quite a lot if one works constantly with N-Dimensional (with N != 1) compared to 1D arrays in terms of speed, but …

Member Avatar for grumpier
0
90
Member Avatar for AlSal

I've been trying to find a complete list of the c/c++ libraries and all of their functions, but everywhere I look, I only find a part, never the whole thing. Is there a website where I can find such detailed list?

Member Avatar for BeyondTheEye
0
94
Member Avatar for jits_aps90

Some numbers like 1,2,3,4,.... are provided from the command line. Considering them to be roots of a polynomial of that degree< equal to number of roots > , i was trying to find the coefficients of the constructed polynomial, i was using the concept of multiplication of two single degree …

Member Avatar for jits_aps90
0
98
Member Avatar for plike922

run it type hello, press enter then type end in a c ompiler [CODE=c]#include <stdio.h> #include "strlib.h" #include "simpio.h" #include "genlib.h" #include "string.h" #define size 50 void reverse(char rev[]); int main() { char rev[size], i; printf("Please enter a sentence and end the sentence with a enter than end \n"); reverse(rev); …

Member Avatar for Aia
0
145

The End.