868 Posted Topics

Member Avatar for Zopharr
Member Avatar for Jonezy

[code=c] if (temptype == 'casual') { // I think you missed this brace here. casual object_name; // Removed the brackets. // causal object_name() is a function called object_name that returns a causal object. // You want a instance of class causal. thecasuals.add_casual(object_name); } //.. rest of the else ifs [/code]

Member Avatar for Jonezy
0
4K
Member Avatar for gilb29

[quote=Ancient Dragon;268722]I don't like the American version of football -- too dull, uninteresting and brutal. European football (what we call socker) is a lot more exciting.[/quote] Reminds me of what some foriegn dignitary said after watching his first American football game. "If it is a game, it is too much. …

Member Avatar for mattyd
0
66
Member Avatar for pointers
Member Avatar for Niklas

Too long to make all the corrections. Make corrections for number 1 and number 19. You can understand as I have commented the changes. Do the others yourself and post if you have other problems. [code=c] #include <iostream> using namespace std; const double PI = 3.1415; // The constant pie. …

Member Avatar for FireSBurnsmuP
0
239
Member Avatar for woj117

Have you tried using the [URL="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/listview/macros/listview_sortitems.asp"]ListView_SortItems[/URL] macro?

Member Avatar for WolfPack
0
101
Member Avatar for Florida Ryan
Member Avatar for snedan

(1567 / 1 ) % 10 = 7 (1567 / 10 ) % 10 = 6 (1567 / 100 ) % 10 = 5 (1567 / 1000) % 10 = 1 See a pattern?

Member Avatar for ~s.o.s~
0
100
Member Avatar for Dani

I don't see how we can use it in a reply to a technical question. From what I have noticed, it just takes us to the blog list with keyword [tag]google[/tag], and it is the responsibility of the reader to filter out what he needs. That rather doesnt achieve what …

Member Avatar for ~s.o.s~
0
325
Member Avatar for matrimforever

Just change it to [code=C] cout << "\nThe value of theValue in num1 is " << num1.getValue(); // The get and set public functions are provided to access private variables [/code]

Member Avatar for matrimforever
0
108
Member Avatar for suep

Looks like your question doesnt belong in the C/C++ or for that matter in any software development forum. To create charts in Windows you can use Microsoft Excel. Was that what you were looking for?

Member Avatar for ~s.o.s~
0
88
Member Avatar for waldis

[quote=waldis;267934]I'm attaching the binary file with extension .txt [/quote] Attachment? What attachment?

Member Avatar for waldis
0
96
Member Avatar for andor

Leave it to the WoLfMaN to figure it out. :cheesy: @Andor: Surely you are using hybrid mode in IE, and linear mode in Firefox. Just so that to make it clearer, I attached an image so that you know how to change it (if you didn't already know) [quote=cscgal;267618]I think …

Member Avatar for andor
0
117
Member Avatar for depsch

Use [URL="http://www.cppreference.com/stdio/sprintf.html"]sprintf [/URL](or snprintf (if available this is the best )) to create a string in the form of "InputNumber%d", and pass that to the AnimationNodeInCreate function. [code] int i; char label[ 15] = ""; for (i=0;i<36;i++) { sprintf ( label, "InputNum %d", i ); mInputs[i] = AnimationNodeInCreate ( i, …

Member Avatar for WolfPack
0
115
Member Avatar for Raj@web
Member Avatar for FireSBurnsmuP

[quote=Clinton Portis;266734]Try this: [code] cin.getline(playerOne.c_str(), 21);[/code] [/quote] This will not work. [URL="http://www.cppreference.com/cppstring/c_str.html"]c_str()[/URL] returns a constant pointer to the character array. You can't change it.

Member Avatar for WolfPack
0
153
Member Avatar for matt611

[code=c++]class JarType { public: friend JarType operator+(const JarType&,const int); private: int numUnits; }; JarType operator+(const JarType& right,const int add) { return JarType( right.numUnits + add); } [/code] You should change the way you comment and the way you name your member functions. For example do not leave a space between …

Member Avatar for WolfPack
0
110
Member Avatar for LieAfterLie
Member Avatar for LieAfterLie
0
81
Member Avatar for nono909

oh my god. I have seen some pretty badly formatted posts, but this surely takes the cake for the worst. I am sure nobody will take a second glance at this post unless you use [code[COLOR=Black]][[/COLOR]/code] tags and [B]re-post[/B] properly formatted code.

Member Avatar for iamthwee
0
87
Member Avatar for anksphenomenon

I haven't looked at any GTK code. But the main reason for using a pointer maybe that the structure is too large or a lot of instances of that structure is created. By using a pointer, you can create the instance in the heap memory, rather than the limited stack …

Member Avatar for ~s.o.s~
0
90
Member Avatar for Eadams20

There are too many compile errors to be counted. For example [code]void getdownPayment(float& downPayment)[B][COLOR=Red]; // you dont need this semicolon[/COLOR][/B] {[/code] There are a lot of functions that have similar errors. Also it looks as if you are not saving the file in ASCII format. Best thing is to copy …

Member Avatar for Nick Evan
0
104
Member Avatar for taruj83

Indent your code properly. Just telling the program won't give you the result doesn't help. Tell us what you expect and what the program gives actually. [code] void SortList::QuickSort(int X,int I) { int L,R,V; if (I>X) { V=list[[B][COLOR=Red]i[/COLOR][/B]];[B][COLOR=Red]// what is this simple i? I don't see it declared anywhere.[/COLOR][/B] L=X-1; …

Member Avatar for WolfPack
0
108
Member Avatar for stymiee

[quote=DMR;256651]Now- tell me, Oh Uberly One: how do I get my sound card working under FC5? [/quote] An uberly one I'm certainly not so confusion arose in my simple thought Surely in your marsupial abode Ought to be a disc of windows stored?

Member Avatar for letsjoy
0
405
Member Avatar for tirivamwe

We don't do homework. If you post code which you have written upto now, and say where you are having the problems, we will help.

Member Avatar for tirivamwe
0
129
Member Avatar for taineechan

use [URL="http://www.cppreference.com/cppstring/length.html"]std::string::length()[/URL].

Member Avatar for taineechan
0
137
Member Avatar for rgbivens

[CODE]//--------------------------- // lab8.cpp // Author: Grant Bivens // Class: EET 2303 C++ // Professor: Dr. Imad Abouzahr // Date: 4-4-06 // This program generates a table of values at specific times along a sine waveform. //--------------------------- #include <stdio.h> #include <stdlib.h> #include <cmath> // includes #include <iostream> #include <iomanip> using std::cout; …

Member Avatar for WolfPack
0
225
Member Avatar for doraemon

It is used when you want to control your program from the command line. Rather than promting the user for input, say for example entering a filename, you can use a switch like [inlinecode] -f filename.txt[/inlinecode] and that will be all the program needs for execution. The command line arguments …

Member Avatar for doraemon
0
216
Member Avatar for ~s.o.s~

Not many newbies bump a thread to say thanks. When something like that occurs it is up to the moderators to educate the users (usually by deleting the unwanted post and giving the reason-this sents an automatic PM telling the user about their offence). Once they get to know that …

Member Avatar for Dani
0
241
Member Avatar for The Dude

[quote=The Dude;264661]Its sad thinking he thought this was his only way out! :([/quote] Wasn't he trying to get in?

Member Avatar for WolfPack
0
112
Member Avatar for FireSBurnsmuP

[quote=FireSBurnsmuP;264534]Do I have to go through a for loop and delete each character individually?[/quote] No. Just calling delete pointer_variable should suffice. The destructor of class string should handle the rest. If you are trying to delete an array of string pointers, use delete []array_name; Another thing is make sure that …

Member Avatar for ~s.o.s~
0
115
Member Avatar for nasduck
Member Avatar for GreenDay2001

[quote=vishesh;263012]Suppose I have created a class [B]new [/B]with arguments. [/quote] You can't do this. [inlinecode]new[/inlinecode] is a C++ keyword. You can't create classes or variables with keywords as names. [quote=vishesh;263012] I have declared this as object [B]new1[/B] in the main. [I]new new1(arguments)[/I]. Now what should i do if i want …

Member Avatar for GreenDay2001
0
89
Member Avatar for morning_star_18

[code][COLOR=Red]#include[/COLOR] <stdio.h> [COLOR=Red]// There should be no spaces between # and include[/COLOR] #include <stdlib.h> int main (void) { int n [COLOR=Red]= 9; // initialize n to the value you want[/COLOR] for (int i=0; i<n; i++) [COLOR=Red]// deleted the semicolon[/COLOR] { [COLOR=Red]// You print spaces until n - 1 - i[/COLOR] …

Member Avatar for WolfPack
0
125
Member Avatar for ~s.o.s~

[quote=Ancient Dragon;263869]the thief was taking 1 gr from each trinket[/quote] You didn't tell this initially. We all thought that the cheat could steal only from [B]his[/B] trinket. So the total was always 1 gram less than 55 oz. :eek:

Member Avatar for Ancient Dragon
0
179
Member Avatar for Iqbal_h_a

[quote=Iqbal_h_a;262984] My question is, doesn't compiler provide the default constructor when we declare an object of type const? [/quote] There is no such limitation. The above code compiles under Visual Studio 2003. PS. But if you have a data member in the class, things should be different. That is because …

Member Avatar for Iqbal_h_a
0
176
Member Avatar for maxinetyl

Try the [URL="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shellexecute.asp"]ShellExecute[/URL] API.

Member Avatar for maxinetyl
0
118
Member Avatar for ~s.o.s~

I got spatial too. But I am sure I got all but one correct. How do you get the results?

Member Avatar for ~s.o.s~
0
165
Member Avatar for CurtisBridges

This question does not belong in the C/C++ forum. The email address within a post is also not allowed. If you give me the OS you are using, I will move this to the correct forum. Although under normal circumstances I would delete the email without question, I will do …

Member Avatar for gerbil
0
118
Member Avatar for LegerdemaiN

Just use the [URL="http://www.cppreference.com/cppstring/replace.html"]replace[/URL] method of the C++ string class. Something like this perhaps. [code] #include <iostream> #include <string> int main() { std::string email("[email protected]"); std::cout << email << std::endl; email.replace( email.find('@'),1, "AT" ); std::cout << email << std::endl; return 0; } [/code] One thing to note is that only the …

Member Avatar for LegerdemaiN
0
91
Member Avatar for The Dude

Looks like I am getting a bit rusty. [B]You Passed 8th Grade Math[/B] [IMG]http://images.blogthings.com/couldyoupasseighthgrademathquiz/passed.jpg[/IMG] Congratulations, you got 8/10 correct! [B]Could You Pass 8th Grade Math?[/B] [URL="http://www.blogthings.com/couldyoupasseighthgrademathquiz/"]http://www.blogthings.com/couldyoupasseighthgrademathquiz/[/URL]

Member Avatar for xyfay
0
159
Member Avatar for WolfPack

Is it just me or isn't this a bit dangerous option? ( Like Format C: (Y/N) ). Once you uncheck all and press save, all your contacts are gone unrecoverably? I am too chicken to press and see what happens. Tried to upload a screenshot of this option, but couldn't …

Member Avatar for Anonymusius
0
183
Member Avatar for jado

[quote=joeprogrammer;258507]it features a seperate close buttons for each tab, that it now has a built-in RSS reader [/quote] The RSS feeds are cool. But I would really like the close button to be at the previous place. That way, when I have to close a lot of tabs at the …

Member Avatar for jbennet
0
155
Member Avatar for ~s.o.s~

Okay. How do you know that someone flagged your post as bad in the first place? Only moderators can read the bad post reports. And I double checked the bad posts section. Nothing has been reported on that post. Are you sure that you got reported? Yep. Checked again. A …

Member Avatar for happygeek
3
385
Member Avatar for johnnyrocket

[quote=johnnyrocket;259441]I've placed a CSV file into an array with C++ with each row being a single array element, but the file contains many, many columns that I don't need. I only need columns 1,2,3,4,6,7 out of about 50. Is is best to read the full value into the array and …

Member Avatar for iamthwee
0
5K
Member Avatar for calvin 44

I believe you are looking for something like [URL="http://pubs.logicalexpressions.com/pub0009/LPMArticle.asp?ID=388"]this[/URL].

Member Avatar for calvin 44
0
62
Member Avatar for Seadragon
Member Avatar for computerages

[quote=computerages;259613]I want a program, which will set an alarm on a computer at a specific time according to the day and time... and a window will pop up on the screen with your own text on it.... I want the yellow notification box on the toolbar to popup indicating a …

Member Avatar for Salem
0
274
Member Avatar for Behzad Oskooi

In any case your problem doesn't relate to C or C++. Please refer the modem documentation, or ask your question from the particular modem manufacturer's support staff.

Member Avatar for WolfPack
0
91
Member Avatar for Clinton Portis

Do this [code]struct SongInfo { int track_no, track_pos, track_len_min, track_len_sec, runtime; SongInfo *next; [B][COLOR=Blue]friend [/COLOR][/B]ifstream& operator>> (ifstream& ins, SongInfo *target); [COLOR=Blue][B]friend [/B][/COLOR]ostream& operator<< (ostream& outs, SongInfo *target); }; [COLOR=Blue][B]ifstream[/B][/COLOR]& SongInfo::operator>> (ifstream& ins, SongInfo *target) { ins >> target->track_no >> target->track_pos >> target->track_len_min >> target->track_len_sec; return ins; } [COLOR=Blue][B]ostream[/B][/COLOR]& SongInfo::operator<< (ostream& …

Member Avatar for Clinton Portis
0
128
Member Avatar for shermaine

hmmm. This is getting out of hand. Is it just me or are more and more people expecting us to do their work? [quote=shermaine] What should i add on so that user can enter the four weights from the keyboard. The program should print an error message is the weights …

Member Avatar for vegaseat
0
173

The End.