51,593 Topics

Member Avatar for
Member Avatar for akki_freak

hi folks, plz try sending answers to folllowing questions....i know they are a lot..still...send as many as possible..... Write a "Hello World" program in 'C' without using a semicolon. Write a C++ program without using any loop (if, for, while etc) to print numbers from 1 to 100 and 100 …

Member Avatar for Rashakil Fol
0
354
Member Avatar for tristan17

Hi guys, i got this error when i was trying to compile a program "LINK : fatal error LNK1104: cannot open file "jbig.lib" Error executing link.exe." can somebody please explain this error, coz I am a newbie in C/C++ , all advice will be greatly appreciated. rgds, xin yann

Member Avatar for Ancient Dragon
0
79
Member Avatar for fidelljf

im pretty much stuck with this problem. [code] / ************************************************************************** // // Airplane.cpp // // Program that displays the seat diagram for an airplane and allows the user // to select a seat. If the seat is available, the program marks it as taken // and displays a new diagram. …

Member Avatar for WolfPack
0
72
Member Avatar for fidelljf

how could i display the reverse the values of the array that are random numbers using pointers. So far this is what I have. it displays the array but it does not display the reverse. [code] #include "stdafx.h" #include <iostream> #include <ctime> #include <cstdlib> const size = 10; typedef int* …

Member Avatar for fidelljf
0
103
Member Avatar for ilikerps

Hello, I am having a problem with sockets. Not the sockets themselves, exactly, but more of the recieving and accepting of messages and connections (respectively) at the same time. My program runs a loop where it will wait to accept a connection (using accept()), and then wait to recieve a …

Member Avatar for ilikerps
0
131
Member Avatar for iqbal

I am try to write a C++ program that tells the eldest and youngest sibling in a family. I am write this program declaring a class.I write all code program but my program does not compiles and give oprator error. Please someone check this and make it correct.I need this …

Member Avatar for dwks
0
171
Member Avatar for Operator

Hey everyone, I'm writing a program for a class. It's a relatively simple C program that I'm compiling in Dev C++. I'm trying to make it as complex as possible, but I'm just a college freshman and don't know much beyond the basics of programming. I'd like to enable option …

Member Avatar for Dave Sinkula
0
160
Member Avatar for kdw3

Im trying to create a simple RLC program. Im n ot sure the best way about it, but im trying to to use to 20 character arrays. One to read in the characters to be compressed (buffer) and the other is used to as a check. Either way, the buffer[20] …

Member Avatar for Ancient Dragon
0
299
Member Avatar for TimC

Now that my program is growing in size and I have quiet a few display functions is it possible to put all these display functions in another header file eg. display_functions.h My objective is to clean up my main() file so I dont have to scroll up and down all …

Member Avatar for winbatch
0
265
Member Avatar for TimC

I have 2 functions in my main(). When I call the first function void patient_main_menu(); it will leave me input all the required fields and it also will print to screen EXACTLY what I had inputed originally. When the second function is called void doctor_main_menu(); it SKIPS/ Will not leave …

Member Avatar for TimC
0
229
Member Avatar for iqbal

I am try to write a C++ program that tells the eldest and youngest sibling in a family. i try to write write a member function that overloads the > Operator to sort the Siblings according to their ages after making comparisons.but i am fail. please someone write this. thanks …

Member Avatar for Dave Sinkula
0
242
Member Avatar for pplqingshi007

I want to call a dos command, such as "dir/B *.txt >>a.txt", how can I realize it in C or Fortran code?

Member Avatar for dwks
0
108
Member Avatar for iqbal

I am try to write a C++ program that tells the eldest and youngest sibling in a family. i try to write write a member function that overloads the > Operator to sort the Siblings according to their ages after making comparisons.but i am fail. please someone write this.i need …

Member Avatar for dwks
0
280
Member Avatar for fidelljf

I'm working on a problem where the user inputs the first name, middle name and last name and should produce the output, last name, first name then midde initial. example: input: John Smith Doe output: Doe, John S. the program should also work even if the user does not put …

Member Avatar for Lerner
0
140
Member Avatar for DotNetUser

I'm coding in Visual C++ .NET. I have a managed class(FORM1) that displays a form. .NET framework objects can only be define within function scope. I have a main program that creates an instance of FORM1. I have some callbacks in main that need to access the functions in FORM1, …

Member Avatar for Dave Sinkula
0
64
Member Avatar for kdw3

I am trying to output a string to a file in the form cout << "\" << (an expression) << "\"; however, my compiler won't accept it, i can't get it to output that without there being a space between the slash and the close bracket i.e. "\ ". There …

Member Avatar for server_crash
0
75
Member Avatar for Acidburn

Hello, I've figured out how to transfere a full contents of file into a buffer. Nut now say if i wanted to do: Surname[20]; Firstname[20]; Age and its stored in: user.txt like: Chilver Jackson 25 How would I get the input stream to stop filling the surname up when it …

Member Avatar for Dave Sinkula
0
120
Member Avatar for winbatch

I have developed a set of libraries/common classes that I use in all my apps (this is on unix), and compiled them into a shared object (.so). Then, when I compile my individual apps, I link the library with the executable with -L /libs/ -l mylib . When running any …

Member Avatar for winbatch
0
243
Member Avatar for ToySoldier

Hi everyone... I'm learning arrays and cant figure out why my cout is showing "scattered" output... I'll upload my infile and source code. I'll also upload the example of the correct output my teacher wants us to show on execution. I'm struggling with the "UNKNOWN" State Name listing too. I …

Member Avatar for ToySoldier
0
195
Member Avatar for Keyonts

Hello, I learned about vectors. And when I was debugging my project using vecors I peeked at the vector class member functions and non member functions and I thought wow where did all this come from. Who did this. I understand since im a novice that it can appear intimidating, …

Member Avatar for Dave Sinkula
0
107
Member Avatar for ban26ana

I know you don't do homework for people. But I'm not really sure where else to turn to, because my online tutor for my class isn't really helping. I'll show you the code I have. (I worked about 6 hours on it, honestly. I'm really really bad at this.) If …

Member Avatar for ban26ana
0
275
Member Avatar for bucsoldier03

i have this program trying to read from a file but i keep getting this error message what am i doing i cant figure it out. [code]#include<iostream> #include<cstdlib> #include<cstring> #include"assignment9.h" #include<fstream> using namespace std; const int MAX_LEN = 30; int numofRecords() { int numRecords; cout <<"number of courses to process: …

Member Avatar for dwks
0
110
Member Avatar for Brims

Hiya all ive decided to do my final year project designing an online music video library that will allow multiple access by many users to the same files that will be highly available, with facilities to access the video library by pc, pda and mobile phones. i want to concentrate …

Member Avatar for dwks
0
93
Member Avatar for kdw3

I am trying to create a simple program to read in words from a file, count the words, and output a histogram of word lengths normalised to 1. I am having trouble reading in the words from the file. If anyone could help, it would be greatly appreciated. Regards Kevin

Member Avatar for Dave Sinkula
0
187
Member Avatar for Puckdropper

I'm working on a program where you find any path through a graph. When inputting the graph using an array, I found the number in position[0][8][9] gets set as 1 rather than 0 after position[0][9][1] is read in to memory. I've tried both gcc 3.3.2 and 4.0, and get the …

Member Avatar for Dave Sinkula
0
110
Member Avatar for Keyonts

I have a simple plane object with public datamembers of a flight number and a pointer. I am successfully adding "planes" and deleting "planes," however when I try to move one up a spot, though it compiles well, I seem to get memory crashes. Here is my bump function that …

Member Avatar for WolfPack
0
154
Member Avatar for iqbal

i try to write a program using class that take number of particulars of sibling and take the name and age of each particulars from user and allocated seats. but my program has some error and does not compile and run. my code is: //header files #include<iostream.h> #include<conio.c> //class definition …

Member Avatar for tyczj
0
158
Member Avatar for desertstorm

Hello: I have a question regarding struct when making hash buckets eg. typedef struct _hashNode { void *key; void *value; struct _hashNode *next; } hashNode; let's say when I create the table: hashNode *nodeList = (hashNode *)malloc(sizeof(hashNode) * 200); This is because I want a fixed list size and then …

Member Avatar for Ancient Dragon
0
756
Member Avatar for DotNetUser

This code is written in VC++.NET. I have a windows form that display data from a socket port using callbacks. I have main.cpp that calls Application::Run(new Form1). The socket processing code is currently in the Form's file. I want to separate the Form1 from the socket processing code. Put the …

Member Avatar for perniciosus
0
118
Member Avatar for kahaj

What exactly is the purpose of the scope resolution operator? I can't seem to find anything in my book telling exactly what it does. It just seems to dance around the subject somewhat.

Member Avatar for SpS
0
897
Member Avatar for iqbal

i try to write a project program about stack. i degined In stack.h templates for stack, push and pop, and defined two stack objects one for integer and other for Float in main.cpp to get following types of output, but my but program does not compiles and give error. source …

Member Avatar for SpS
0
125
Member Avatar for TimC

Are there any good tutorials out there that explain adding objects to a single linked list. All I have come across are linked lists involving "structs". regards T

Member Avatar for SpS
0
165
Member Avatar for slobo7x

Hello all. I have a small homework problem to write, and I could use a little help, someone to guide me in the right direction. I need to write a program that asks the user to enter the filename, and then enter the string to search in that file. If …

Member Avatar for perniciosus
0
464
Member Avatar for Cudmore

Hey!! Ahh, all day I've been trying to learn something new, so reading over tutorials I compiled my first socket app!! The only problem is, it isn't working the way I would like it to, and I was hoping you gyus could help me figure out the problems.. I appologize …

Member Avatar for perniciosus
0
218
Member Avatar for some one

Additions to Phase 1 Transactions Each account stores transactions information (the type of transaction (e.g. withdrawal, deposit …etc), the amount, the time of transaction and any additional information you think is important). When any transaction occurs this transaction is recorded in the account. So each account has more than one …

Member Avatar for some one
0
403
Member Avatar for sahil_logic

i do not want to use strcmp() so i made it myself. here is my code: [code]#include<iostream.h> #include<conio.h> #include<stdio.h> int main() { char pass[50]; int strcomp(char pass); cout<<" ENTER THE PASSWORD "; gets(pass); int m=strcomp(pass); if(m==1) cout<<" congrats! correct password "; else cout<<" sorry wrong password "; } int strcomp(char …

Member Avatar for perniciosus
0
409
Member Avatar for Niklas

[code] //Calculator Revision to say error when invalid character #include <iostream> using namespace std; int main() { cout <<"Welcome to the 1.1 calculator by Niklas Kunkel"; cout << "\nPlease enter 2 numbers and press enter after each number"; float num1; float num2; char op; float result; char again = 'y'; …

Member Avatar for Niklas
0
173
Member Avatar for nabil1983

im writing a cd database program, i need to know how i can enter characters in a field which include numbers and letters. neone know what the type is for this. i've tried the following: char album[50]; char s1[50]; none of these work they only allow me to write characters …

Member Avatar for winbatch
0
106
Member Avatar for peter_budo

Having strange behaving programs,at the bottom you can find them, but here is short explenation. Main program will present a menu from which you can pick operation to do. When I choose 1 it is suppouse to create file of certain name(not exactly, you have to complile score.c program and …

Member Avatar for peter_budo
0
186
Member Avatar for kharri5

Hello all, I have posted many times questions about Java related topics. This would probably be one of my few C++ postings. The problem I am having is printing out the contents of a vector declared in a class, and inherited in other classes that need to access it. I …

Member Avatar for perniciosus
0
248
Member Avatar for sahil_logic

[code]#include<iostream.h> #include<conio.h> int main() { int a[10],temp,bak; cout<<" enter the elements "<<endl; for(int i=0;i<5;i++) cin>>a[i]; int m=a[0]; for(int j=0;j<5;j++) { if(a[j]>a[j+1]) { temp=a[j]; a[j]=a[j+1]; a[j+1]=temp; } } cout<<endl; for(int k=0;k<5;k++) { cout<<a[k]<<endl; } getch(); }[/code]

Member Avatar for perniciosus
0
188
Member Avatar for Asif_NSU

I've recently swithed from borland C++ 5.5 to MinGW. When I try to compile a .c file using gcc it compiles fine, but when I try to compile a .cpp file using gcc it produces a bunch of errors with c++ specific constructs. If I compile .cpp files with g++ …

Member Avatar for perniciosus
0
188
Member Avatar for smartintelleng

Very simple request, just show me how, in a new windows form application, how I can create and ajust the mount of lets say squares in parent window. Lets say theres a default of 20 squares. But I want to be able to ajust this, in such a way that …

Member Avatar for perniciosus
0
118
Member Avatar for Niklas

I am a novice to C++ but I am trying to improve. Ive started reading quite a few books which include: Learn C++ in 10 minutes - Jesse Liberty C++ Game Programming - Michael Dawson Im still in the first 100 pages in both so im not into to advanced …

Member Avatar for Niklas
0
112
Member Avatar for smartintelleng

Very simple request, just show me how, in a new windows form application, how I can create and ajust the mount of lets say squares in parent window. Lets say theres a default of 20 squares. But I want to be able to ajust this, in such a way that …

0
59
Member Avatar for sahil_logic

//square matrix #include<iostream.h> #include<conio.h> #include<stdio.h> int main() { void diagsum(int a[10][10],int n); void rowsum (int a[10][10],int n); void colsum (int a[10][10],int n); int a[10][10]; int n,opt; cout<<" enter the size of matrix (say 4 for 4/4etc..) "; cin>>n; for(int i=0;i<n;i++) { for(int j=0;j<n;j++) {cin>>a[j]; } } for(int k =0;k<n;k++) { …

Member Avatar for dwks
0
111
Member Avatar for bucsoldier03

i have to convert a program from c++ to C language and at one point in my program im stuck where its dealing with dynamic memory of an array. i started it but i dont know how u do dynamic memomory in c language. [code] if (reply == '1') { …

Member Avatar for dwks
0
227
Member Avatar for sahil_logic

#include<iostream.h> #include<conio.h> int main() { void sortarray(int array[15],int size); void mergearray(int ar1[15], int ar2[15], int ar3[30],int m ,int n); int m, n ,ar1[15],ar2[15],ar3[30],array[15],size; cout<<" Enter the size of the arrays "<<endl; cin>>m>>n; cout<<" Enter the elements of first array "<<endl; for(int i=0;i<m;i++) cin>>ar1; cout<<" Enter the elements of second array …

Member Avatar for dwks
0
193
Member Avatar for guideseeq

Hi all, I've programmed [B]C[/B] & [B]C++[/B] during my college days. I understood its [I]OO model[/I] and coded many examples (this helped me in OO [I]PHP[/I] now). I used something called [I]Turbo C++[/I], a set of some confusing files, which can be carried in a floppy or two. [QUOTE]I now …

Member Avatar for perniciosus
0
459
Member Avatar for heavyc

Ok i am having alittle problem with my code, I am getting 4 errors for having these things unidetitfied but they are so I dont know what is is here is the code that I have so far. The object is to have counters that will count how many comparisions …

Member Avatar for perniciosus
0
195

The End.