49,757 Topics

Member Avatar for
Member Avatar for bucsoldier03

how do u write cin.get in c language and how to open and close files in c languauge

Member Avatar for jim mcnamara
0
116
Member Avatar for juusan

I'm a college student in a C++ class. I'm writing a program, and I get the follow error: [I][taz3] 3:36pm ~/c++ > gcc stustats-sjs.cpp -o stustats-sjs.app stustats-sjs.cpp: In function `int main()': stustats-sjs.cpp:64: ANSI C++ forbids using pointer to a function in arithmetic stustats-sjs.cpp:65: ANSI C++ forbids using pointer to a …

Member Avatar for juusan
0
221
Member Avatar for peter_budo

I'm getting following compile error OrderedList.cc: In member function `std::string OrderedList::find(std::string&, std::string&, int&)': OrderedList.cc:133: error: invalid conversion from `int' to `const char*' OrderedList.cc:133: error: initializing argument 1 of `std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]' OrderedList.cc looks like this [CODE]string OrderedList::find(string& …

Member Avatar for SpS
0
179
Member Avatar for christyj5

I am trying to do an insertion sort that reads from a file it has it own class but i can not get the program to do anything it says no errors but crashes when i try to run [code]#include <string> using namespace std; class Student { public: string lastname; …

Member Avatar for jim mcnamara
0
250
Member Avatar for Dee_Dee

I have to write a program that will check each value in the array for a negative number then the program must either print "The array has no negative values" or "The array has at least one negative value". We have to use the funcion anynegatives(int a[], int arraysize) This …

Member Avatar for SpS
0
264
Member Avatar for Hisham4FCI

hello all it is my first time here to post :cheesy: well i hope i'm welcomed here my problem is i want to read binary file and view it on the console two times [CODE] #include<iostream> #include<fstream> using namespace std; class Student { private: char name[20]; char address[80]; int age; …

Member Avatar for Lerner
0
198
Member Avatar for new guy n c++

HI all; i'm a new in c++ programing and i have some problem that i don't know how to fix it. i have been trying to fix it for severaldays and i it isn't working. can u help me please. this is my program which is A file contains 7 …

Member Avatar for Lerner
0
423
Member Avatar for micropower99

Hey guys, I'm new here, seeing as this is a C++ forum I was wondering if someone could help me out with a C++ assignment I have. I need to make a word counting program. Here is what I need: [url]http://desertonline.net/classes/cs89a/zbecker/files/Assignments/WordCount.htm[/url] Username: cs89a password: ctwo Anyone who completes this project …

Member Avatar for SpS
0
213
Member Avatar for geeta

Hi, i hve asimple c++ prog written in vc++ editor.I am able to run this in my system when i deploy it in another system which doesn't hve vc++ environment its not working the exe just closes... can anyone just tell me how to deploy the exe into another system. …

Member Avatar for WolfPack
0
475
Member Avatar for sarra

hello everybody!! i am new in programming c++ so i would like ur help.. i would like to save an image into a file using c++ but i havent found any tutorial that could really help me... i would appreciate ur help

Member Avatar for SpS
0
130
Member Avatar for dj_money

Here is the one that I've tried and it works. //It will terminate the loop but it's NOT an Auto Infinite Loop like the you had. //Description: //This program asks the user to terminate an infinite loop //with a sentinel value of any kind. # include <iostream> # include <cmath> …

Member Avatar for brian63304
0
2K
Member Avatar for StealthCobra

Here is my program with the errors any help would be appreciated. error C3861: 'headTail': identifier not found, even with argument-dependent lookup error C3861: 'results': identifier not found, even with argument-dependent lookup error C2365: 'headTail' : redefinition; previous definition was a 'formerly unknown identifier' error C2365: 'results' : redefinition; previous …

Member Avatar for SpS
0
204
Member Avatar for some one

Implement a system for a bank. Design it so it can be used by the bank’s staff. It should enable the following: o Opening a new account for a customer o Closing an account o Displaying all accounts An Account o Contains the name of the customer o Contains the …

Member Avatar for some one
0
237
Member Avatar for kahaj

I'm trying to write a program to simulate a tortoise & hare program. They begin at square 1 of 70. There is a clock that ticks once per second. With each tick, the program should adjust the position of the animals according to a chart I've been given to follow. …

Member Avatar for Dave Sinkula
0
228
Member Avatar for scoobie

Hi, i am very new to c and was wondering if anybody can help me. i want to create an array of size 1 million bits. i heard you can use malloc or calloc. does anybody know how to do this, thanks in advanced, sc

Member Avatar for rnodal
0
341
Member Avatar for Cudmore

Hey! I'm learning C++ and pointers are pretty new to me, I can work with them a little but [I]still[/I] don't see the point to them.. ok, well, I do.. For example, passing variables byReference! But that's the only good I see comming from pointers (yup, I'm a n00b).. [B] …

Member Avatar for Cudmore
0
132
Member Avatar for some one

hi every1 i want to ask what wrong with my program it all work allright just the zakat function when i run the program the output is garpege here is the code [CODE] #include <iostream.h> #include <conio.h> #include <stdlib.h> class Customer { private: char name[20]; char address[30]; char city[20]; char …

0
94
Member Avatar for virusm

I need C++ source code for CPU Task Scheduling. Anyone who can help me plz send me some Source code. My project is to design a Scheduler in C++ with a queu. I'll give more information to anyone who will respond to my msg. Thnx men... :sad:

Member Avatar for Dave Sinkula
0
78
Member Avatar for stupidenator

Hi everyone, I am trying to make a function such as [CODE]void resetGrid(int grid[][gridSize])[/CODE] The function needs to input the 2-D array and then set each of the values to zero. I know this should be a simple double 'for' loop but what I can't figure out is how far …

Member Avatar for stupidenator
0
88
Member Avatar for atrusmre

I'm sorry I've been posting so much, I'm still learning. :) My question how do you fill a combo using a varible. for example I want to fill my combo box in Visual C++ with something like this. [CODE] char *names[2]; names[0] = "Joe"; names[1] = "Billy"; names[2] = "Bob"; …

Member Avatar for atrusmre
0
2K
Member Avatar for brian63304

I am trying to create a list of nodes and then put numbers in them.. I can do that. But I need help trying to sort the nodes. Here is my program. Thank you, Brian [code]int null = -1; typedef struct Node { int val; Node next; Node(int v, Node …

Member Avatar for kafkanien
0
74
Member Avatar for rupz

Hi, I am new to c++ and just wanted to know how to split a sting e.g if someone were to enter their details like John age 19 dob 10/06/1986 into a basic cin, how could I split the string to store John 19 10 06 1986 into different strings …

Member Avatar for rupz
0
89
Member Avatar for btech

My program compiles with no errors but when I run the program it asks "Enter the number to be deleted:" if I enter any number other than the first number listed the program crashes with the following error: "An unhandled exception of type 'System.NullReferenceException' occurred in doublyLinkedList.exe Additional information: Object …

Member Avatar for Lerner
0
192
Member Avatar for Ancient Dragon

This is a simple example of how to use recursion to get a list of all the directories (folders) and file names within them. It also illustrates simple use if std::list, std::vector, std::string, std::cin and std::cout. It was compiled and tested with both VC++ 6.0 and Dev-C++ compilers on XP …

Member Avatar for Dani
0
238
Member Avatar for Clinton Portis

Having troubles handling text from a multiline edit box.. the first part of this algorithm runs fine by itself.. the second part (highlighted in blue) runs fine as a DOS console project using 'char' data types.. but when I add it to this windows project (using TCHAR's) it distorts the …

Member Avatar for WolfPack
0
652
Member Avatar for Micko

Hi, sometimes I get this linker error LNK2019: unresolved external symbol _WSACleanup@0 referenced in function _main and sometimes it works OK. Solution is usually to place pragma directive below include directives [code] #pragma comment(lib, "wsock32.lib") [/code] First, can someone explain in simple words what this means? Maybe it's some kind …

Member Avatar for WolfPack
0
134
Member Avatar for smallville

Hi guys/gals, Boy what an experience it has been searching and reading through these forums. I have learned so much! I was given the task of pulling information from a database and entering it into a program that would sort the names. I was able to get that step down …

Member Avatar for Dave Sinkula
0
195
Member Avatar for Asif_NSU

I wanted to explore and know about the GUI toolkits available to be used with C or C++. I heard a bit about Qt, GTK, Mingw etc, and there's MFC too. For the moment I am not quite sure which one to start with. Does a programmer need to know …

Member Avatar for Ancient Dragon
0
570
Member Avatar for jack223

can't find where the error occurs using debugger? any help plz~~ [code] //this program computes how much money will //accumulate after so many years of investing #include <iostream> using namespace std; float Balance = 0.0; float Interest; float YearlyCont; int NumYears; //this function computes one year of investment float newBalance(float …

Member Avatar for jack223
0
129
Member Avatar for btech

The assignment I am working on is to create a doubly linked list. This is what I have thus far. However when I compile I get 2 errors: LNK2001 unresolved external symbol and LNK1120 unresolved externals. Was hoping someone could look over my code and help me with these errors. …

Member Avatar for Ancient Dragon
0
159

The End.