51,593 Topics

Member Avatar for
Member Avatar for jefanot

Hello, I really need help. If anyone could, please tell me what I'm doing wrong. Well, I'm making this program that asks if you're happy. Then if you don't answer yes, it will ask the question again until you do. I thought that it would be fun to have a …

Member Avatar for William Hemsworth
0
119
Member Avatar for power_computer

Ok I have to make a 3-D array within a class and read from a file with input like this [code] 90312 Thing_1 12.34 100 25 // Shelf 9, row 3, bin 12 20705 Thing_2 54.78 24 25 10101 Another_Thing 123.45 183 4 [/code] There array is based off 9 …

Member Avatar for power_computer
0
277
Member Avatar for Silvershaft

I got a problem when using mysql connector with wxWidgets my program crashes right when I start debugging, but it gives no compiler errors. Main.h [code]#ifndef __MAIN_H #define __MAIN_H #include <wx/frame.h> #include <wx/textctrl.h> #include <wx/button.h> // Mysql #include "mysql_connection.h" #include <cppconn/driver.h> #include <cppconn/exception.h> #include <cppconn/resultset.h> #include <cppconn/statement.h> class MainApp: public …

Member Avatar for yonghc
0
241
Member Avatar for CrAzD

I'm trying to figure out how to get info off of a 1 structure to use to get info from a second structure and use the info from the second to change the first. Here's some code hopefully explain it better. [code=c] struct weapons { string name; int str; }; …

Member Avatar for CrAzD
0
120
Member Avatar for NightLightSky

hey i really need help, how can i generate a simple coding of pythagorean table where it reads the upper right triangle? together, how to get table parameters, use nested loops (which prints out the raw list of all Pythagorean-candidates (do not need to store in an array) & how …

Member Avatar for Foamgum
0
174
Member Avatar for complexcodes

Hey guys, I have written a recursive function mazeTraverse which finds the path of the mouse to find its food which is placed inside the maze. I am given a maze of of 15 rows and 25 columns. Mouse's starting position is (8,1)[eighth row and 1st column] and the food …

Member Avatar for sfuo
0
109
Member Avatar for Der_sed

The following binary search code runs perfect . I feed values that exist in the array and it tells me at what location they are. But if i enter a value non-existent in the array it goes bad. It says number not in array and after that... [U] Any other …

Member Avatar for vmanes
0
114
Member Avatar for cookies

I'm using system("color __"); and system("title ____"); in my code and I'm struggling on how to change them according to the input. eg. if the user enters he wants green background and yellow words ... i'm stuck with 2 variables (i would convert them to 2 and 6 [the numbers …

Member Avatar for cookies
0
77
Member Avatar for KonkaNok

Hi, I noticed a few snippets recently where a size_t variable was used for array indices, and after searching around I'm still not sure what the obvious advantage of using a size_t variable over a typical int would be.. To clarify, what would be the difference between this: [code=cplusplus] for(size_t …

Member Avatar for KonkaNok
0
148
Member Avatar for xagutxu

Hi! I am using the Microsoft Visual Studio to build a program that has several threads. The threads communicate among them reading a shared variable; thus, a thread is waiting: "while (variable == 0);", until other thread puts the variable into 1. That occurs more than one time in the …

Member Avatar for xagutxu
0
129
Member Avatar for mostermand

Hi I have a problem, I hope you can help me with. I have a number, which I need to compare to some values. I do not wish to go through all the values, and compare them individually, as I there are too many for it to be efficient. Neither …

Member Avatar for mostermand
0
175
Member Avatar for crash override

I've been trying to get started with sockets programming. However, when I try to use the getaddrinfo and freeaddrinfo functions, my linker complains that they are "not declared in this scope" and that they are "unused variables". I have checked the header (ws2tcpip.h) and the headers appear to be declared …

Member Avatar for ndarkduck
0
4K
Member Avatar for voidnull
Member Avatar for MattyRobot
Member Avatar for leadenwinter

I'm a total newbie and.. with the code above.. What I want to do is have 10 dValue numbers, but if, of those 10 I only enter 5 values, the exe shouldnt ask me to enter all 10 and just add the 5 values I entered when I press the …

Member Avatar for MattyRobot
0
222
Member Avatar for dwhvw

Hi, How can I convert the TeMyEnumeration constants to integer values? See code below [CODE] typedef enum{ zero, one }TeMyEnumeration; typedef struct{ TeMyEnumeration myEnumeration; int myInteger; } [/CODE] I send this complete structure, byte by byte, using a memory pointer to some serial output. I want the myEnumeration variables also …

0
80
Member Avatar for initialise

Hi, I'm hoping someone can help! I'm writing a sign language tutor that displays a video of someone signing and then expects the user to record themselves performing the same sign. The program works perfectly when run through Visual C++ 2008 Express Edition. However, if the .exe file is run …

0
59
Member Avatar for KIEX

help me with the linked list where we have parkinglot ,with class apassenger,class acar,class aParking area.the program should register passenger, driver,car also able to remove a car in parking area[code]limplementing a linked list[/code]

Member Avatar for Dave Sinkula
-1
68
Member Avatar for metalclunch

Well. I've been developing a small game. This is what I have done: I've created a Engine project, which has these files in it: Geometry.h Engine.h Engine.cpp Now, I've created another project, called Test, and it has only one file in it: Main.cpp. I've included the Engine.h by modifying the …

Member Avatar for metalclunch
0
122
Member Avatar for skirmish

I'm having some real problem with a list of objects. My objects in this case are called Aircraft & I've given them these features: [CODE] int flightNo; void setFlightNo(int i) { flightNo = i; } int getFlightNo() { return flightNo; } [/CODE] Ok, all good - until I put them …

Member Avatar for skirmish
0
128
Member Avatar for evilguyme

hmm.. i have just a bit of experience in c++ and i'm just coding a program to learn. it is a windows forms app and there are 3 forms in one same project. how do i get a textbox value from one form and use it as a variable in …

0
64
Member Avatar for philastean

[B]* please help me to download the file (inpout32) form the page ( [url]http://www.logix4u.net[/url] ) becuase : [/B] * when I opened that page , appeared there is error in page. * please put the file in this forum.

Member Avatar for Ancient Dragon
0
23
Member Avatar for rajeev_rsd

I'm working on a Project, which includes downloading some files from INTERNET, and the code language is C++, I'm using Codegear C++ Builder 2009, If anyone knows how to download a file using c++ code. please help me, I'll be greatly thankful if you provide a code snippet and then …

Member Avatar for kvprajapati
0
142
Member Avatar for chunalt787

I am writing a database API in C++ and I cant seem to think of a good way to handle the errors. For example if certain error conditions are met I would like to set some sort of error flag and allow every class to check that flag. I have …

Member Avatar for David Boon
0
214
Member Avatar for yonghc

I am inclined to suspect that Borland C++ compiler 5.02 is seemingly full of bugs. Even though my C++ codes could be bug free, it reported External errors on compiling and failed to create an EXE file to run. Thanks to Mr. Salem, I have successfully compiled the above codes …

Member Avatar for yonghc
0
414
Member Avatar for icu222much

I am trying to create a program where it will read in the student name, nationality, and grades, and calculate their tuition fee based on those information. I began to write a bit of code by I have ran into some problems. When I try to run my code, the …

Member Avatar for icu222much
0
74
Member Avatar for AirGear

i usually use Visual Studio 6 or sometimes Dev Cpp.. but, they can't show me the runtime and the memory spent.. i need that information, to make sure that my program is qualified.. can someone help me about cpp compiler that can do that? thx.

Member Avatar for AirGear
0
134
Member Avatar for CD-4+

hello every one.. i m a newbie and was going through structures.the code is as followes: [code]#include<string> using namespace std; #define n_emp 3 struct workerdb { string name; short age; int salary; }employee[n_emp]; void printdb (workerdb); int main() { int n; for (n=0;n<n_emp;n++) { cout<<"name: "<<endl; getline(cin,employee[n].name); cout<<endl; cout<<"age: "<<endl; …

Member Avatar for mrnutty
0
157
Member Avatar for sjcomp

Hello, I would like to find out if there is a c++ library that supports fuzzy string search. If I have a list of words such as: hello, there, cool. But I search for 'Helo' I would get Hello. I assume this is a solved problem for spell checkers. Anyone …

Member Avatar for mrnutty
0
111
Member Avatar for OffbeatPatriot

When you're done reading this feel free to tell me if I've completely misunderstood .NET As I understand it on Windows code can be compiled to IL which then allows it to be used from any .NET language like c\c++\c#, and basic. So could I, and if I can how …

0
70
Member Avatar for arelius

Hello all, I am taking a course in C++ and in Ada. Our professor has given us the choice to be tested in language profficiency in either C++ or Ada. The test format will be of simpler programming problems and more geared towards shortanswer concepts. I was wondering if anyone …

Member Avatar for dgr231
0
240
Member Avatar for vatsa.devil

i'm a little confused with the keypress thing.. this is how i write my code.. if(KEY_DOWN(VK_UP)){ // my statement ... } now what i want to achieve is, i want my statement to execute only once when i press up key. instead what happens is it keep executing till i …

Member Avatar for sfuo
0
229
Member Avatar for Kombat

p1a.c: In function `main': p1a.c:20: parse error before `char' p1a.c:46: parse error before `char' p1a.c:47: `result' undeclared (first use in this function) p1a.c:47: (Each undeclared identifier is reported only once p1a.c:47: for each function it appears in.) p1a.c:47: `basechars' undeclared (first use in this function)

Member Avatar for Kombat
0
149
Member Avatar for AceiferMaximus

Is it possible to call a .dll I made in C#, and use it in my unmanaged C++ code? If so, can someone show me an example of how this is done, or a link to go about doing it. I wasn't able to find much on google, and most …

Member Avatar for AceiferMaximus
1
2K
Member Avatar for daviddoria

When debugging my code, I put a break point at this line: [code] std::set<unsigned int>::iterator it; [/code] When I step over that line, I get "Debugger reported the following error: cannot access memory at address 0x10". I am using KDevelop that ships with Fedora 11. I've used that line of …

Member Avatar for Nick Evan
0
3K
Member Avatar for dpreznik

Dear friends, I need a help with a Wait (Hour Glass) cursor. In my MFC program, I have the following code: [CODE] void CBookDoc::SomeMethod() { AfxGetApp()->DoWaitCursor(1); // display the hourglass cursor ... // Some stuff is done ... AfxGetApp()->DoWaitCursor(-1); // -1->>remove the hourglass cursor }[/CODE] I wonder why the cursor …

Member Avatar for dpreznik
0
549
Member Avatar for yonghc

Two lines in the codes below have been remarked out else compiling would fail: //arrcon[1]=*scon; //count << "arrcon[1] " << arrcon[1]; The intention was to assign character values to an array with 5 elements, each with a maximum 35 characters, declared as a string array, arrcon[5],[35]; I was trying to …

Member Avatar for yonghc
0
412
Member Avatar for Lukezzz

I have filled up a List with many elements of "Hello". Now I wonder how it is possible to use MemoryStream to "chunk" this and append it to an existing file.("C:\\OutFile.txt") I have googled around on examples for 2 days without really understand how to do this. I have understand …

Member Avatar for kvprajapati
0
186
Member Avatar for anuraggupta16

when i compile, it gives the following error : Undefined first referenced symbol in file main /auto/usc/gnu/gcc/4.2.1/bin/../lib/gcc/sparc-sun-solaris2.10/4.2.1/crt1.o ld: fatal: Symbol referencing errors. No output written to a collect2: ld returned 1 exit status Can anyone please tell as to what's going wrong here.[code]I have some code where i want to …

Member Avatar for MattyRobot
0
121
Member Avatar for vishalkhialani

Hi, I need to use the borland c++ complier for making my college project. I use only linux and I am unable find the compiler. Any help will be much appreciated as I am stuck. cheers, Vishal p.s- Gcc and other compilers are not allowed for the project .

Member Avatar for vishalkhialani
0
523
Member Avatar for priyabalu87
Member Avatar for dkalita
-1
142
Member Avatar for gerbanzo129

Hey i have this homework problem that i can't seem to solve. i have already did the rest of the program but i have to change the output of this program but i can't seem to make it work. the output they want is.. Home Owner Price of Home Seller's …

Member Avatar for necrolin
0
95
Member Avatar for Trekker182

Hello everyone, I'm writing some code for an assignment that reads in a line of characters into a STL list, sorts them alphabetically and then has to reorganize them vowels to the front. Right now I'm stuck on the step of writing a function that accepts the list as a …

Member Avatar for Trekker182
0
198
Member Avatar for lotrsimp12345
Member Avatar for blahbla

hi i need some help with adding a bunch of random numbers. i dont understand how to add them all. heres the code: [CODE]#include <iostream> #include <cmath> using namespace std; int main () { int i,x; srand (time (NULL)); for (i=1; i<=10; i++){ x=rand()%10+1; cout<<x<<endl; } system ("pause"); return 0; …

Member Avatar for blahbla
1
160
Member Avatar for RedWinger

Hello everyone, I'm having a bit of an issue here. I'm doing a Knight's Tour program for class, and thought I just about had it until this problem popped up. While I was writing my code, I had some simple cout test statements after some of the function calls just …

Member Avatar for Salem
0
101
Member Avatar for daviddoria

I have a function like this: [code] bool MyFunction(dist) { if(dist < 1.2) { std::cout << "Passed test!" << std::endl; return true; } else { std::cout << "Failed test!" << std::endl; return false; } std::cout << std::endl; } [/code] gcc tells me "warning- control reaches end of non-void function". However, …

Member Avatar for StuXYZ
0
277
Member Avatar for Mafia619

i am tryin to make a c++ program to play tic tac toe.........there are some errors hope u guys can help me out......... [CODE]#include<iostream.h> #include<conio.h> #include<stdlib.h> char matrix[3][3]; void cou(void); int main() { int m,n; char ch='y'; while(ch=='Y'||ch=='y') { for(m=0;m<3;m++) { for(n=0;n<3;n++) { matrix[m][n]='\0'; int i,j,sum=0; while(sum<10) { if(sum==0) { …

Member Avatar for sfuo
0
280
Member Avatar for johndoe444

The following is the randomized Binary search tree insertion algorithm mentioned in sedgewick's book. "This function makes a randomized decision whether to use the root insertion method of Program 12.13 or the standard insertion method of Program 12.8. In a random BST, each of the nodes is at the root …

Member Avatar for johndoe444
0
142
Member Avatar for Supercharger

i need help with this C++ array excercise.... it seem quite simple but im not sure what code i need to put where. help is greatly appreciated... Excerise:: [url]http://www.lhs.logan.k12.ut.us/~rweeks/cp1/array.htm[/url]

Member Avatar for dgr231
0
156

The End.