51,593 Topics
![]() | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. … | |
Quick question: Normally when I have a function, I can make one or more of the 'last' arguments as defaults, for example: [code] string whatever( int a, string b="NONE" ) { //blah, blah, blah string temp= "WHATEVER"; return temp; } [/code] The benefit is that I can have one function … | |
Hi everyone. I am working on a project which has to change the value of a variable in the executable. Specifically, writing this program: [code]int a = -1; int b = 3; int c = a + b;[/code] I have to go into the executable and change the value of … | |
Hi everyone I am really having trouble right now with oracle for linux. Please tell me how to connect oracle using c/c++ in linux. If anyone knows about any tutorial or have code, please plzzz post me that as well. | |
My program compiles fine but I get a segmentation fault when reading in a dat file.... I had it in a loop but I thought thats what was causing the error, it doesnt even cout anything either. heres the code: [code]indata.open("lib/assign4.dat3"); cout << county[7]; indata >> county[8]; cout << county[8]; … | |
Hi I want to use a File->Print choise in an application with the index written in a memo. how can i print the memo field as a text ? | |
Hi everyone, I am having trouble with a prgram that simulates Conway's Game of Life. I cannot get the program to run past a few generations. I think I am having trouble with the countNeighbors() or the genNextGrid() functions that is causing the game not to function properly. Anyone have … | |
Can someone help me, I've been trying forever and still can't get it. I need to get my C++ program to print in dos enviroment. I need it to print the words "Hello" when i push something and nothing else. #include <cstdlib> #include <iostream> #include <conio.h> using namespace std; int … | |
I am really impressed with the advancement of open source software. Projects like mozilla and linux are really amazing. What programming languages do most of the open source projects use? Do you think open source projects will continue to take market share from the big guys? | |
I have a class Person and a Class Store. I didn't find any way to really inherit Store in class Person, so I created Class Store in a namespace called StoreClass. In the person class this doesn't work: using namespace StoreClass; it says that namespace StoreClass is undeclared. I also … | |
Hello ladies and gents, I was reading about how "Passing by References" for efficiency and there was a little program added wich shows what the difference is between passing by value and passing by reference is. The program is this one: [code] #include <iostream> using namespace std; class SimpleCat { … | |
I have the following code: [code] ostream Person::operator<<(ostream& out, const Person& p) { out << "/n*********************************" << endl; out << "Name: " << Person::getName() << endl; out << "Age: " << Person::getAge() << endl; out << "Health: " << Person::getHealthLevel() << "%" << endl; out << "Happiness: " << Person::getHappinessLevel() … | |
I've had a terrible time with this program. I don't really understand it that much, but have been working on it for about 4 hours so far. One of the problems I'm having is that it keeps saying that local function definitions are illegal. Here's the program so far. Input: … | |
I am trying to write a program that will demonstrate the use of functions with a structure. I know a lot of students try to get quick answers, I want to learn, but I am stuck, and could really use some help. I keep getting the following error: C2448: 'salary' … | |
hi guys, i am a beginner and i need a few books which are really good and have lots of exercises.it would be better if it was fully devoted to exercises like 'Exploring C' by Yashavant Kanetkar which was excellent.All his C books are fantastic. you can finnd them at … | |
I need to write a program, in C++, that will read from a .dat file How do I make one? My book mentions a header line, etc. It does not go into any more detail and I can't find a description of how to do it online. Am I making … | |
Please help i am getting an error message when i try to complie my program. It gives me this error rror C2664: 'output_calculations' : cannot convert parameter 1 from 'double (double,double)' to 'double' Context does not allow for disambiguation of overloaded function. I have not the slightest clue what this … | |
I have two things that I cannot figure out. I know I'll kick myself when I see what they should be. How do I assign the value pointed to by "sSaverPtr" to the variable "filled"? "sSaverPtr" points to a long int. And how would I then go about printing the … | |
In Visual C++ is there a way to update a singal control without updating them all? If so how? (for example, I want to have a clock in my program that doesn't interfer with my trying to type other things). | |
Hi... please help me with this qn... i really have no idea how to start off... thanks.. i have attached the pdf here... pls do help me... it will be great if you can tell how to start off... thanks thkanks | |
PLEASE HELP!!! Ok, I've been racking my brain for the past two or three days now on this question, and before you click the back button, I might add I'm not looking for the answer, I'm looking for clearification of the question... here's the question: "In a paragraph or two, … | |
I'm finshed with teach yourself c++ in 21 days. It's been fairly good at teaching the basics, but I have two books I need to select from to read next: c++ programming language --bjarne stroustrup the c++ standard template library I just don't which to read next. Which would you … | |
Hello :) I am in Computing Science 160 and need to do a C++ assignment. I need a program that reads in user input of strings (ex. PTLPPDNQL*) and stopping when a * is read. It then needs to read each letter as a value (P = pennie or 1 … | |
Hi, Can someone help me in a borland c++ code? i already have a memo field and i want to count the words, i count the blanks but i have problem when appears 2 or more blanks together and when i write to the second line.. Also can anybody tell … | |
Trying my hand at extracting user entered data from a multiline edit box... my strategy is to first, get the number of total lines from the edit box.. and the length of each line from the edit box.. and create a dynamic 2D array that is NULL terminated at the … | |
Hi there people! I am trying to implement various sort methods in one program, just to practise implementing sort methods for one of my courses at varsity. However, my method works fine, the moment I use the pointer that it returned, it broke. Here is my program: [code]#include <iostream> #include … | |
I can compile my programs easily using MS C++ but I just installed Borland C++BuilderX and I cant compile... <sigh> It's ghosted out. [B]// my program #include <iostream> int main() { std::cout << "Hello World!\n"; return 0; }[/B] This is what I'm doing... 1: Execute C++BuilderX 2: Click new 3: … | |
please how do i store large numbers in c. the number has no be large like 121223824824623423476234762347623423476234234342342332762376 maybe up to 100 digits or more. after storing the number i need to carry out mathematical operations on that number which of course has been stored in a variable. mathematical operations like … | |
I was wondering if there's a way to convert a CString or a char *x[10] to a int? I know I can convert int to CString, but can it go the other way? Thanx, Atrus | |
Hi guys This is not my homework it is a private project Iam working on .... and Ive searched google for an answer...I also found a similar thread on this site but the code would not work. Can someone tell me please how to create a full screen form in … | |
The following code works. However i want it so when the user reaches 500 dollars the last cout statement will run. But for some reason i can't get it to work properly. It skips the last cout statment and enters -numbers. [code]#include <iostream> using namespace std; int main () { … | |
Hello, I've tried to implement a queue using a array which loops. (Circular lists). However something is wrong. When I add a new item to the list , I get the 'case digit' aswell... heres the code : [php] #include <iostream> #define MAXSIZE 3 using namespace std; void insert(int array[]); … | |
I can't seem to get this sorting alogorithm to work: [code] #include <iostream> void sortAssending(int nums[], int size); int main() { int nums[] = {175,167,160,164,183,187,188,179,176,175, 169,175,176,178,165,160,173,165,187,178}; sortAssending(nums, 20); for (int i=0; i<20; i++) { std::cout << nums[i] << std::endl; } system("PAUSE"); } void sortAssending(int nums[], int size) { for (int … | |
hi. new here. Im a freshman at UCSB and im taking my first c++ class. I got this assignment in class and i was hoping for some tips. The value of pi to 15 decimal places is PI = 3.141592653589793 . . . Your job is to write a program … | |
I've been working with OpenGL and Visual C++ for a short time, and I just tried to use the GLUI library for some fuctionality. But now I'm getting this error: [CODE]LINK : fatal error LNK1104: cannot open file 'LIBCD.lib'[/CODE] I've realized that the library is not anywhere to be found … | |
Hello, I've been struggling to implmenent a 2 way link list. The code runs but when I enter the 2nd element into the list I get a segmentation fault......I cant find my error could anyone take a look? [php] #include <iostream> using namespace std; typedef struct record { int num; … | |
I'm having a brain fart. How would I write the following in c++? if (x is divisible by 15) Thanx, Atrus | |
[php] int main() { int state = -1; int scanning = -1; cout << "Welcome to the lexcial scanner.\nPlease enter a char" << endl; char textfile ; textfile = getchar(); if(textfile == 'A' || textfile == 'B') { state = 1; textfile = getchar(); cout << "does it work?" <<endl; … | |
I direly need help with passing an array of structures into a function. The problem is that Main_menu.name is blank. What is the correct syntax to pass by reference, so that I will get the Main_menu.name in main()? I would like to use pointer in the createMenu function for efficiency. … | |
Hi, We are working on an assignment where we have to use haptic interface and VRML file. This assignment also asks us to include a sound of the VRML image which we are using. Could anyone please help us as to how to code in C language to upload winamp … | |
Hopefully I'll be able to explain this issue. If not, I may just have to post a lot of code. Basically, I've got a base class called 'Log' with virtual methods of writing to a log. I have two descendent classes - ScreenLog and FileLog (with all the same methods). … | |
Sample run of the program: Welcome … Please type in your budget: 120 Menu Select an item from the above menu: 2 How many of this item you want?: 2 Please confirm [Y : yes, N : no] ?: Y Total cost for this item = 50.000, Budget remaining = … | |
please help me how to write this program. write a program to calculate: a - b / c * d + e *f % g where a , b , c , d , e , f , g are integer the output format like. a= b= c= d= e= … | |
hi evry1, need opinion here to create a business graphic software... [COLOR=DarkGreen]http://www.smartdraw.com/product/flo/index.htm[/COLOR] is there any api to achieve like the image shown in the above link... what should i read on...to do a similar dekstop app... thanks in advance.. one more thing...can c and c++ combine with web programming lang … | |
if i try to use this constructor BigNum d("-2345"); how do i get the compiler to convert the string to a negative number?here's the code i have for this constructor [code]BigNum::BigNum(string s) { num = new node; num -> next = NULL; num -> val = 0; int i, j, … |
The End.