15,300 Posted Topics

Member Avatar for ArrogantLegend

That doesn't tell much. Appears like the program is just writing one word to the file then attempting to read it back. The open() statement you have will erase everything that's already in the file. If you want to add more words every time you run the program then you …

Member Avatar for ArrogantLegend
0
78
Member Avatar for sneekula

[QUOTE=briansmall;495359]No I don't .. and I sure didn't mean for that smiley face to show up either. I entered a simple colon-end parens ..[/QUOTE] Before you press the [b]Submit Reply[/b] button scroll down the page and you will find a checkbox under [b]Miscellaneous Options[/b] to disable smilies in the post.

Member Avatar for reddawg
0
1K
Member Avatar for jeffige

>>how can someone (namely myself) tell if the code is written in C or C++? firstly by the header files. iostream is c++ only. >>the window closes. Because you have to add some code to stop it from doing that so that you can see the output. The console window …

Member Avatar for highspeedhook
0
175
Member Avatar for EvEyUm21

>> dont know how to display the contents in my program You only use one set of code tags. I deleted all your code because its too much trouble to fix., so please repost and use code tags correctly. Here's how to do it. [noparse] [code=c] // put your code …

Member Avatar for Ancient Dragon
0
70
Member Avatar for manu1001

you can write a wrapper function in the *.cpp file that the C function calls, then let the wrapper function call the class method. The following function can be called by C programs. [code] // c++ file extern "C" int foo() { // call c++ class function } [/code]

Member Avatar for vijayan121
0
311
Member Avatar for dkwantee
Member Avatar for DissertationIT

Don't be in such a damed big hurry! Afterall you only made your post 25 minutes ago. Give it at least a couple days for people to read your post and respond (if they want to).

Member Avatar for Ancient Dragon
0
177
Member Avatar for newport

where is the array [b]A[/b] declared ? >>I don't know how to call these values. You don't call values -- you call functions. So I don't really know what you are asking here. >>I can only think of return A[i][j] and that doesn't work why not? what are the some …

Member Avatar for jephthah
0
103
Member Avatar for ctor

Read the [URL="http://www.libsdl.org/download-1.2.php"]tutorials and other documentation[/URL]

Member Avatar for ctor
0
87
Member Avatar for wollacott

lines 8 and 16: remove the semicolon on those two lines. I assume you are attempting to write functions there ??? If that is correct then you can not nest functions inside other functions like that -- see main() on line 3. Move the code for those functions outside main(). …

Member Avatar for jephthah
0
122
Member Avatar for Dark Pallys

My advice: rewrite it in C or C++. If the data is sent across serial port then use MSCom1 dll for the communications -- I thik its probably compatible with Win98. Use sokets if the data is sent across the internet.

Member Avatar for Dark Pallys
0
103
Member Avatar for Ancient Dragon

[URL="http://www.ksdk.com/news/watercooler/hot_topics_article.aspx?storyid=141828"]teach exercise classes at the W[/URL] Just saw this on TV local news. What an inspiration -- hope I'm that active at her age :) [quote] The instructor is Louise Larsen and she's 90 years old! "She loves teaching. She loves fitness," says Kirkwood YMCA manager Diane Wagner. "She just …

Member Avatar for vegaseat
0
143
Member Avatar for nickthedivil

>>strcmp(chartryname, charname)==0 && (chartrypassword, charpassword) ==0 Like this: [icode] if( (strcmp(chartryname, charname)==0) && (strcmp(chartrypassword, charpassword) ==0) ){ [/icode]

Member Avatar for amitahlawat20
0
114
Member Avatar for kemboy
Member Avatar for digitz101

you don't need cstdio header file, and never ever use gets() even in c programs. Use getline() in c++ to get strings [code] cout<<"input your name: "; cin.getline(name, sizeof(name)); [/code] You don't have to use cin.ignore() after getline(), only after entering integers [code] int x; cin >> x; cin.ignore(); [/code] …

Member Avatar for Ancient Dragon
0
89
Member Avatar for Joatmon

>>2. Are too complicated for me to understand. multithreading can be complicated. I use the win32 api functon CreateThread() to create a thread. Not all that complicated once you realize many of the paramters are left 0 :) [code] DWORD WINAPI ThreadProc(void * lpParameter) { // This is the start …

Member Avatar for Ancient Dragon
0
110
Member Avatar for jalo3030

>>I need help work wil not compile Same questions as I posted in your other thread. I'm not a mind reader and I can't see your monitor.

Member Avatar for Ancient Dragon
0
120
Member Avatar for jalo3030

>>Whats am i doing wrong it is not compile Errors ??? compiler ? operating system ?

Member Avatar for Ancient Dragon
0
286
Member Avatar for BtiGold

[QUOTE=willcomp;555123]Newegg is the site of choice for most. Tiger Direct has some good buys, but most involve mail in rebates. [url]http://www.newegg.com/[/url] [url]http://www.tigerdirect.com/[/url][/QUOTE] Agree -- that's where my son always gets parts.

Member Avatar for BtiGold
0
105
Member Avatar for jalo3030

Do the requirements one small function at a time. Code, compile, fix erorrs, then compile again. Repeat that until all errors have been fixed before doing any more of the program. You can start like this: [code] #include <iostream> int getDrawers () { // put your code here } // …

Member Avatar for Ancient Dragon
0
93
Member Avatar for jalo3030

line 5: remove the open parentheses after =. line 8: replace close parentheses with a semicolon lines 9-17: you can not put the calculations here because the value of [b]input[/b] is not yet known. line 20: its a big mess :) you are mixing c's printf() format specification with c++ …

Member Avatar for Ancient Dragon
0
430
Member Avatar for jesseb07

>>Also, I have no doubt there are better ways to emulate getch(), if you know of one please point me in the right direction. Its called [b]curses[/b].

Member Avatar for jesseb07
0
2K
Member Avatar for jeffige
Member Avatar for jeffige
0
206
Member Avatar for lifei

The link you posted is used by the Microsoft Foundation Class (MFC) which is a set of c++ functions that wrap the win32 api functions. In order for that program to be useful to you, you must have one of the [URL="http://msdn2.microsoft.com/en-au/vs2008/products/default.aspx"]Microsoft compilers[/URL] that supports MFC and those compilers are …

Member Avatar for Ancient Dragon
0
171
Member Avatar for os.hacker64

[QUOTE=os.hacker64;555220]I doubt you since you are a n00b. ^ |:)[/QUOTE] Low post count says nothing about knowledge. Also see [URL="http://www.programmingforums.org/thread15369.html"]this thread[/URL].

Member Avatar for Ancient Dragon
0
95
Member Avatar for bjmakond

This isn't really a VB question but a system administration question. Remove all those programs from the Start menu and any shortcuts that may be on the window. Its not completly foolproof but might reduce the chances that those products are accessible to the normal computer user.

Member Avatar for Ancient Dragon
0
51
Member Avatar for shaka2

Is this a C or C++ program? You have a mixture of the two header files. It looks like mostly C so I'm moving it into the C board.

Member Avatar for Ancient Dragon
0
237
Member Avatar for amitahlawat20

You need to create a new [b]mat[/b] object inside that function, add the two matrixes parameters together then return it. I think this is a good candidate to use the throw statement if the two matrices can not be added. [code] mat operator + (mat &m1,mat &m2) // mat is …

Member Avatar for Ancient Dragon
0
86
Member Avatar for guddukohli

Tackle this problem one small step at a time, don't get overwhelmed and attempt to do it all at once. Start out very simply, with int main() and create a 2d char array that represents the rows and columns. Get that to compile without errors and then move on to …

Member Avatar for Ancient Dragon
0
68
Member Avatar for knight fyre

line 20: fflush() is only defined with output streams such as stdout. What you have is undefined behavior. Since the line about is an output line maybe you meant to use stdout instead of stdin. either line 21 or 26 will work, as well as this: [icode] fgets(section_1[tally1].first_name, sizeof ((PATIENT_DATA*)0)->first_name, …

Member Avatar for knight fyre
0
167
Member Avatar for grgreen

If you have XP on C: and Vista on D: then you don't have to reinstall anything. Just boot up on XP and reformat the d drive. The only problem I see with that is that you will still have the duel-boot menu. You need to edit the boot.ini file …

Member Avatar for willcomp
0
90
Member Avatar for s88

>> return x[(count2)+1]; the above is on the inside of the loop so the loop will only run once. >>for (count = 0;count <= 20;count++) this loop will count one too many times. the array only has 20 elements but the loop will run 21 times.

Member Avatar for gxm
0
157
Member Avatar for nelledawg
Member Avatar for WaltP
0
132
Member Avatar for Tsuruya-san

most likely 2) your fault. You are probably not using the same compiler and/or operating system that the program's author used. Post a link to one of the programs so that we can take a look at it. And what compiler/os are you using?

Member Avatar for Tsuruya-san
0
114
Member Avatar for drtucker

you need two variable -- highest and lowest. Initialize them to be the value of the first array element. Next code a loop to count from 1 to the number of items in the array, then test each array element against those two variables, and change the variable value to …

Member Avatar for plgriffith
0
117
Member Avatar for joufaf

I would start by reading a whole line at a time, then checking to see if it contains a space(s) and number at the end. if it does then set variable [b]size[/b] to that number and read that many names. >>dynamicArrayClass myArray(size) That won't work because it will allocate only …

Member Avatar for Ancient Dragon
0
110
Member Avatar for Jennifer84

use two '' characters similiar to how you did it in the open statement. [icode]out << "Some Text" << "\\" << '\n';[/icode]

Member Avatar for Jennifer84
0
116
Member Avatar for midimatt

line 168: two problems: 1) doesn't look like malloc() was everf called to allocate space for name. That will most definitely crash the program. 2) you are passing a pointer to a pointer in that function. Remove the & because [b]name[/b] is already a pointer.

Member Avatar for midimatt
0
153
Member Avatar for Ancient Dragon

In IE6 there was a menu File --> Open. That doesn't exist in IE7, or I can't find it. So I resort to using Windows Explorer and double-click on the *.htm file I want to load. Anyone know how to do it like IE6 ? Or a better way (in …

Member Avatar for jbennet
0
216
Member Avatar for heshangho

>>How do u define a 2by 5 array..is it mean Yes you are right. >>how do u figure out how many elements in the array? first dimension times second dimenson. Very similar to a chess board where there are 8 rows and 8 columns, which means there are 64 squares. …

Member Avatar for heshangho
0
107
Member Avatar for agrawalashishku

The value of [b]level[/b] is never getting incremented, so after the program executes [icode]level--;[/icode] the value of [b]level[/b] is -1. And -1 is not a valid number to use for indexing into arrays or to be passed to [b]validity_check()[/b] Learn to use your compiler's debugger so that you can easily …

Member Avatar for agrawalashishku
0
97
Member Avatar for Jennifer84

Something like this might work: you need std::string with its find() and substr() methods. read the entire word into one std::string object start loop locate a comma use std::string's substr() to extract the word from position 0 up to the comma now use std::string's find method to see if it …

Member Avatar for Lerner
0
918
Member Avatar for hyperzero4

You are seeing all that garbage on the screen because the program is printing more array values than what was read from the file. In your example, 30 * 30 is 900, not 10,000, so the loop should stop at 900. You need to save the counter from line 17 …

Member Avatar for lAmoebal
0
113
Member Avatar for Barbarrosa

[QUOTE=VernonDozier;553414]To add numbers to your lines, simply do this: [noparse] [code=C++] // paste your code here [/code] [/noparse] [/quote] Not supposed to use c++ any more. use cplusplus instead of c++.

Member Avatar for VernonDozier
0
126
Member Avatar for danibootstrap
Member Avatar for Lutzee

I think you have to write a CGI program using C, C++ or some other language. Whatever you use you have to write out the entire page using HTML markup language.

Member Avatar for Ancient Dragon
0
85
Member Avatar for Cbeginner_us

You have to know the file format before it is useful to you. The link that stupidenator posted will show you how to use the FILE to read a file, but that is useless if you don't know the details of what the file contains.

Member Avatar for Ancient Dragon
0
128
Member Avatar for mrjoli021

you are close -- just leave out the [b]i[/b] -- do not specify the number of words but let the compiler figure it out from the number of initializers. And BTW this is NOT an array of pointers but an array of std::string objects. There is a huge difference. [code] …

Member Avatar for Ancient Dragon
0
91
Member Avatar for MEDIAMAN39
Member Avatar for Ancient Dragon
1
89
Member Avatar for sjgriffiths

>>char filename[27]="c:\B2B Data\files\file.txt"; your compiler should have issued a lot of error messages about that line. Never ever ignore errors or warnings (in your own code) Most of the time, like the above line, warnings are actually errors waiting to crash your program.

Member Avatar for Ancient Dragon
0
89

The End.