15,300 Posted Topics

Member Avatar for losthope10

Did you post the EXACT question and code because that code will not compile due to several syntax errors. >>What will be printed if the user enters “Wingding”? Nothing because there is nothing in the program to accept anything from the keyboard.

Member Avatar for bdvenom
0
141
Member Avatar for ithelp

The can of Dr Pepper I am now drinking doesn't emit any vibrations on its own, so that theory is proved false.

Member Avatar for GrimJack
0
310
Member Avatar for touqra

you can't do that. But what you can do is have a vector of vectors, just like a 2d array of doubles [code] vector<double> columns; vector<columns> rows; [/code] Now each row is like your vector_0, vector_1, etc.

Member Avatar for siddhant3s
0
115
Member Avatar for atman

I have no idea what you are talking about. What is "lazy evaluation" ? And why does it matter whether cio_putstr() returns void or something else ?

Member Avatar for ArkM
0
325
Member Avatar for Nad42

>>it sorts but then just quits out of the program for no reason.. Nope. It quits because there are problems with the code you wrote. Please post the code so that we can help you. The basic idea of sorting structures is the same as sorting an array of integers. …

Member Avatar for Nad42
0
149
Member Avatar for lucky_multani

you have a few problems with that class. I just put all the files into one *.cpp file because I was too lazy to use separate files as you posted them. The main problem was in the readBinary() function. Using the sample data you posted I got the same output …

Member Avatar for Ancient Dragon
0
97
Member Avatar for plantf7**344

Welcome to DaniWeb. With all your experience I suspect you will be a big asset for helping others.

Member Avatar for Ancient Dragon
0
162
Member Avatar for rukunaditya

>>Is it possible to print anything on screen in C or C++ without using main(). Yes -- write a MS-Windows win32 api program which uses WinMain() instead of main(). Or use VC++ 2008 and it will generate a console program that starts with _tmain().

Member Avatar for Narue
0
171
Member Avatar for crazyluigi

I think your loop is wrong [code] int main() { char op; do{ printf("\n"); printf(" A : Quadrado\n "); printf("B : Rectangulo \n"); printf(" C : Circulo\n"); printf(" D : Triangulo\n"); printf(" E : Trapezio\n"); printf(" Indique a opcao : "); scanf("%c",&op); op = toupper(op); // cin.ignore(256); // printf(" Opcao …

Member Avatar for crazyluigi
0
1K
Member Avatar for Usura

read them in as characters so that you can read them one character at a time.

Member Avatar for Ancient Dragon
0
84
Member Avatar for venucpp

Is there a question there? Or are you just posting your code because you are very proud of it?

Member Avatar for William Hemsworth
0
96
Member Avatar for Pogo24

>>What types of job positions are computer programmers needed for, Other than the obvious software development types? I've had programming jobs at banks, accounting, manufacturing plants, government, and military. The most interesting ones to me were at the manufacturing plants, such as donuts, paper mills, tooth brushes, and jellybeans, just …

Member Avatar for Stinomus
0
99
Member Avatar for borbor4IT

Welcome to DaniWeb. Please feel free to browse around the many threads we have about networking and other topics.

Member Avatar for Jackson80988
0
51
Member Avatar for azjherben

Steps [list] [*]Open original file for input, in binary mode std::binary as second parameter [*]Open output file for writing in binary mode [*] Create an unsigned char array for i/o [*]In loop call ifstream's read() method to read , then write the buffer using ofstream's write() method, until end-of-file. [*]Close …

Member Avatar for Luckychap
0
823
Member Avatar for Ancient Dragon

Too bad they don't [URL="http://www.youtube.com/watch?v=lF4qii8S3gw&NR=1"]teach this [/URL]in school any more :)

Member Avatar for Ene Uran
0
27
Member Avatar for Lothas

try pre-declaring the classes in the header files, but that works only if the object you want to use is a pointer. So you would probably have to change [icode]GLCursor MovementCursors [/icode]to a pointer [icode]GLCursor* MovementCursors;[/icode] [edit]what ^^^ said :) [/edit]

Member Avatar for Ancient Dragon
0
357
Member Avatar for Torso_Boi

srand() doesn't return a value. All that function does is seed the random number generator. What you want is rand(), not srand(). srand() should be called only once at the beginning of the program to seed the generator. From then on the program calls rand() to get a random number. …

Member Avatar for Torso_Boi
0
95
Member Avatar for phoenix911

>>only prob i have now is storing it in2 an class array What array? You need to post the exact class declaration instead of making us guess what you are doing.

Member Avatar for Ancient Dragon
0
122
Member Avatar for gretty

The first thing you have to do is design the structure. What information is on each line of the file? You can't do anything else until you figure that out.

Member Avatar for Ancient Dragon
0
92
Member Avatar for zack.walters

Reading the information from the data file is very much similar to how you have it coded now to get it from the keyboard. The only difference is that you have to open an ifstream object. [code] ifstream in("infile.txt"); int i = 0; while( in >> studentInfo[i][0] ) { in …

Member Avatar for ithelp
0
215
Member Avatar for ithelp

Nice, but don't walk around their lawn in bare feet :) If you have ever stepped on a wet pasture pattie with bare feet then you know what I mean.

Member Avatar for ithelp
0
121
Member Avatar for K'rul

Why did you put all that C code inside a C++ program? I realize C++ supports FILE* and associated functions, but if you want to write c++ then do it the right way using fstreams and other c++ classes.

Member Avatar for szcfama
0
241
Member Avatar for gretty

To find both row and column, start the function out by setting both values to 0, and [b]temp[/b] to the value of whatever is in a[0][0]. Then if the value in a[i][j] > temp (note: not >=) change the value of all three variables -- temp, row, and col.

Member Avatar for Ancient Dragon
0
6K
Member Avatar for cristane

[QUOTE=cristane;839655]We all know that Obama has made it clear that he is going to make restrictions on outsourcing businesses. If implemented then that means trouble for many countries that relies on outsource businesses like call centers and other businesses. Do you think it’s a sound decision made by him?[/QUOTE] Yes, …

Member Avatar for serkan sendur
0
186
Member Avatar for winrawr

>>unsigned short int If you are compiling for UNICODE you should be using wchar_t datatype for portability. *nix computers define wchar_t as unsigned long int, which is obviously not the same as MS-Windows. And the last time I read the UNICODE standard was considering a 64-bit integer so that it …

Member Avatar for winrawr
0
138
Member Avatar for massivefermion

There is none. [URL="http://www.cs.bu.edu/teaching/cpp/polymorphism/intro/"]Here is an explanation[/URL].

Member Avatar for siddhant3s
0
189
Member Avatar for Sarlacc
Member Avatar for gabohan

>>Is there an easy/fast way to convert C++ with class structure, etc to C? No. First convert the class to a structure and remove all its methods as well as access rights (public, protected, private). If it has base class(s) you will have to remove them too. Next, convert class …

Member Avatar for gabohan
0
239
Member Avatar for ashishchoure

compiling on a 64-bit operating system is not sufficient -- you have to build it with a 64-bit compiler.

Member Avatar for ashishchoure
0
189
Member Avatar for Generalcrix

>>but i seem to be encountering some problems. Do you mind explaining what problems? Do are we supposed to guess?

Member Avatar for Salem
0
141
Member Avatar for Slacker101

>>if (answer1 == 'Leave') answer1 is just a single character and you are attempting to compare it, illegally by the way, to a string. You need to make answer1 a character array and use strcmp() to compare it to a string. Or you could make answer1 a std::string object, since …

Member Avatar for Stinomus
0
170
Member Avatar for szcfama

Please seee post #11 in [URL="http://www.daniweb.com/forums/thread193067.html"]this thread[/URL] because its the same problem.

Member Avatar for Ancient Dragon
0
30
Member Avatar for BlackStar

because no memory has been allocated to aSome -- its nothing more than a pointer that has a random address.

Member Avatar for Stinomus
0
220
Member Avatar for cool_aj

What operating system (and version) are you using? You may have to go to Tools --> Compiler Options --> Directories also in Programs tab, then add the full path to all files and programs

Member Avatar for cool_aj
0
130
Member Avatar for azjherben
Member Avatar for azjherben
0
102
Member Avatar for 1obama
Member Avatar for serkan sendur

I think a name change would be a great idea :) John Doe or Bill Smith would be a good names to inherit. >>and i wont feel like foreigner each time i am asked what my name is But you are a foreigner. Technically we are all foreigners except the …

Member Avatar for verruckt24
1
256
Member Avatar for pferian

[URL="http://www.codeproject.com/KB/wtl/WTLExcel.aspx"]Here[/URL] is one way to do it , I think, without the complications of COM. The GUI interface is probably not what you want but you can extract the ideas that document presents.

Member Avatar for pferian
0
152
Member Avatar for mufon

The link you gave is some sort of download page written in some language I don't know. attach your project to your post here at DaniWeb. Just use WinZip to zip it up, press the Go Advance button in the "Quick Reply To Thread", then the "Manage Attachments" button. This …

Member Avatar for Ancient Dragon
0
103
Member Avatar for quintabelina
Member Avatar for vietnamvisa
0
249
Member Avatar for hemant ghagre
Member Avatar for cutieshunky

All of the problems with the code you posted are due to carelessness -- misspelled words. When programming you have to learn to pay attention to small details, such as capitalization and spelling. Look at your compilers error messages and fix the problems one at a time. Normally the first …

Member Avatar for Ancient Dragon
0
105
Member Avatar for Majestics
Member Avatar for MosaicFuneral
0
137
Member Avatar for miniroselit

[code] int** foo() { int i; int** array = malloc(100 * sizeof(int *)); for(i = 0; i < 100; i++) array[i] = malloc(20 * sizeof(int)); // allocate 20 integers return array; } int main() { int ** array = foo(); } [/code]

Member Avatar for Luckychap
0
148
Member Avatar for cool_zephyr

[QUOTE=cool_zephyr;870650]hey..will anyone tell me how to browse files and folders in a drive using C??[/QUOTE] Depends on the operating system. [list] [*]MS-Windows: FindFirstFile() and FindNextFile(). [*]*nix: opedir(), readdir() [/list] Google for those key words and you will find more information about how to use those functions.

Member Avatar for Salem
0
104
Member Avatar for stardustmeri

So, what is the question? To replace the switch statement with a set of if statements [code] if( property_code == 'R' || property_code == 'r') { } else if( property_code == ??? etc. etc. [/code]

Member Avatar for _Nestor
0
138
Member Avatar for Peter_APIIT

[QUOTE=iamthwee;871348]This didn't compile without problems for me.[/QUOTE] Remove all those comments at the top, then it will compile -- at least it did with vc++ 2008 express. I don't have time this morning to debug the code. My suggestion to the OP is learn to use your compiler's debugger and …

Member Avatar for Ancient Dragon
0
204
Member Avatar for Quessir

who or what is libJudy? (don't tell me its a library because I already guessed that :) )

Member Avatar for Ancient Dragon
0
343
Member Avatar for 35nando

You really need to fix the problem instead of trying to hid it.Try commenting out large blocks of code until the program no longer produces those errors. That will narrow down your search for the problem.

Member Avatar for neigyl_noval
0
322
Member Avatar for graffil

first copy the nodes in each queu until either A or B are empty. After that copy the nodes in the remaining tree until it is empty. If the nodes of each queue are the same structure then you can just copy the address of the nodes from A and …

Member Avatar for Stinomus
0
99

The End.