16,013,642 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by optimus_prime1 (Top 62 by date)
optimus_prime1
1-Sep-11 0:54am
View
This proves to be the wrong approach. Consider these elements in the list after traversal: 2, 7, 5, 10, 12, 15, 17
5, 7 are consecutive and not working according to above approach.
optimus_prime1
21-Jan-11 23:05pm
View
I am fine SAKryukov. Taking a break from C++ for some time ;)
Thanks for the vote!
optimus_prime1
21-Jan-11 14:18pm
View
Already saved it in UTF-8(without signature)-Codepage 65001 from Visual Studio Adavnced Save options. Also, copied and pasted the code from Visual Studio to a new notepas and saved it as form.html and it didn't show any warning/error. :-|
optimus_prime1
21-Jan-11 14:12pm
View
@DaveAuld: Tried that but still the same. However, in Firebug a the end of html file, these symbols are shown. Is this something related to encoding? http://i.imgur.com/NABRx.jpg
optimus_prime1
18-Jan-11 11:59am
View
umm.. I am using this small code snippet for the query string http://pastebin.com/U7aGKcj9
I have to change some things so that on this query string localhost/website/?search=jessegavin , the jessegvain should be appended to my output i.e jessegavin{1:2:3:4). Similarly for all other values searched through query string should be appended to the output. Can you please help me in this too?
optimus_prime1
18-Jan-11 10:27am
View
Hi, your answer was helpful. I have editted my question for another query in continuation this.
Thanks!
optimus_prime1
14-Jan-11 7:00am
View
Yes, I have an interface to create the database i.e the ASP.NET Enterprise Manager but I havem't been able to figure out where to install the .sql scripts in there. Actually, there's a small icon named 'query'. Is that to be used for the SQL Script? Here's the screenshot of the interface I have for creating the database. http://i.imgur.com/LL9xy.jpg
optimus_prime1
11-Jan-11 23:44pm
View
Oh come on! I have already tried that and I have also tried to build through the binaries.
optimus_prime1
11-Jan-11 14:21pm
View
I put up the include guards but the protected memebers are shown still out of scope. Screencap: http://i.imgur.com/x2NcJ.jpg
optimus_prime1
11-Jan-11 13:30pm
View
@Aescleal: Just did that but to no avail. Screenshot: http://i.imgur.com/A9KAs.jpg
optimus_prime1
11-Jan-11 13:28pm
View
@Aescleal: I already tried to include List.h in Sortbale_list.h but then it starts giving huge number of errors related to redefinition of what I have defined in List.h.
P.S I am on Console application in Code::Blocks.
optimus_prime1
11-Jan-11 13:26pm
View
@John: I am coming from Umbraco forums itself and I didn't get the answer of the query there and I am still trying to find the solution on Google.
optimus_prime1
11-Jan-11 13:23pm
View
If it would have been compiling for me, I wouldn't have been asking this. Screenshot: http://i.imgur.com/bc2mx.jpg
optimus_prime1
11-Jan-11 12:07pm
View
List():count(0){}
Link to full code is in the post above
optimus_prime1
9-Jan-11 6:51am
View
Ok, I was able to store the values in the session using the List but how do I have to retrieve these values?
optimus_prime1
6-Jan-11 14:59pm
View
Actually, I figured out that the RoundedCorners Extender in the AJAX Toolkit didn't apply to Button Control. So, now I have used Custom CSS buttons. But there's one problem: Earlier, I had the button control performing the code-behind operation. Now, I have a HTML button. How can I accomplish the same code-behind process now?
optimus_prime1
6-Jan-11 12:50pm
View
:P Thanks SAKryukor for help earlier. I also read a reply by Emilio at one of your comments. He was so true about me having taken some wrong step some time back and then now for(;;)Retry();
Perhaps, one day, I'll start answering questions here instead of asking! :P
optimus_prime1
4-Jan-11 9:59am
View
:P So, at last I did that!
bool empty()const // that's it :P
{
}
I do have any tutor/teacher/instructor since I am a non IT student but I do understand that doing thing oneself if the only way to learn program
Thanks!
optimus_prime1
3-Jan-11 1:24am
View
It turns out that there is another error here in retrieve method if(empty()) return underflow; after changing to data.the_key(). :(
The error: passing 'const List' as 'this' argument of 'bool List<List_entry>::empty() [with List_entry = Key]' discards qualifiers|
It is rather not my mistake and I am tired but I was just following text book to learn these basics. Nae of text book: Data Structures and Program Design in C++ by Robert L Kruse, Alexander Ryba.
optimus_prime1
3-Jan-11 0:05am
View
I changed that to List< Record > the_list; and the_list.retrieve(p, data);
but it gives me a strange error : no match for 'operator<<' in 'std::operator<< [with _Traits = std::char_traits](((std::basic_ostream<char,> >&)(& std::cout)), ((const char*)"Record value: ")) << data'|
optimus_prime1
2-Jan-11 22:44pm
View
I didn't downvote anybody! Why are getting annoyed with me over that :-(
optimus_prime1
2-Jan-11 11:23am
View
uh! I can't format the comment above properly. :-(
optimus_prime1
2-Jan-11 10:54am
View
Ok, now I get this totally.
Thanks a lot for help!!
optimus_prime1
1-Jan-11 23:13pm
View
How? Is it available in Code::Blocks because I am trying applications on console.
optimus_prime1
1-Jan-11 10:36am
View
Hi Manfred,
Thanks for being so cooperative and I really appreciate this. If you'll still allow me to ask, why can't we compare return (x==y) just like this. Why do we even need to use int the_key()const; ?
optimus_prime1
1-Jan-11 9:48am
View
Ok, that atleast compiles now but
1) What does this single colon mean here? List(): count(0){}
2) From the main program, I haven't been able to insert values to the List. Retrieve too gives some error.
If needed, I have uploaded the project here: http://www.4shared.com/file/D1sjC8ta/SequentialSearch.html
optimus_prime1
31-Dec-10 14:31pm
View
@jk chan: I tried to put function and implementations both in one file but its giving too many errors.
Here's the code of List.h -> http://pastebin.com/kJkuzXRV
And here's the code of main.cpp -> http://pastebin.com/8hyiGtqi
Btw, I am trying a Win32 console on Code::Blocks
optimus_prime1
31-Dec-10 5:26am
View
I am confused what's x.the_key(); doing?
int the_key()const; is only defined in the class .h file and there's no more mention of it in the example from a book I am trying the program. It only mentions the_key is being used to inspect a copy of key's value. A little bit more explanation would make this more clear to me.
Thanks!
optimus_prime1
24-Dec-10 4:33am
View
But
for(int i=0;i==5;i++)
{
cout<<i;
}
doesn't give me anything in the output.
optimus_prime1
24-Dec-10 4:23am
View
Yes, I did mention the enum code at the top of my Stack.h class definition like this:
const int maxstack=10;
enum Error_code { success, fail, range_error, underflow, overflow, fatal,
not_present, duplicate_error, entry_inserted, entry_found,
internal_error };
class Stack
{
public:
Stack();
bool empty()const;
Error_code pop();
Error_code top(Stack_entry &item)const;
Error_code push(const Stack_entry &item);
private:
int count;
Stack_entry entry[maxstack];
};
but in Stack.cpp, I am still getting errors "success was not declared in this scope."
My second doubt: I have to make this Stack_entry generic by allowing the user to mention define in his code like typedef char Stack_entry; but if I remove this from Stack.h, errors are: "Stack_entry does not name a type"
optimus_prime1
24-Dec-10 2:09am
View
So, for char and string getline has different syntax?
For char- cin.getline(ch,256);
For string- getline(cin,text,'\n');
Is it?
Then what's the difference between cin.get(text,'\n'); and cin.getline(ch, 256); ?
optimus_prime1
24-Dec-10 1:56am
View
Where is this Error_code definition mentioned? In the global part of the Stack.h definition file?
I tried mentioning this enum in the global part of Stack.h but Stack.h says 'success' was not declared in the scope.
Also, in my Stack.h file, I have mentioned at the top typedef char Stack_entry, but that makes the Stack only to take char values. If I do not declare this in Stack.h file but do this in main.cpp by the client code, then I get error saying Stack_entry does not name a type.
optimus_prime1
24-Dec-10 1:25am
View
Ok, I get this
One is C style pass I was using and the other is C++ style pass by refernce.
Thanks for the nice link. Its really cluttered sometimes on the web. :)
optimus_prime1
24-Dec-10 1:17am
View
Yes, it was an enum and it was a text example from the Data Structures book I was referring to learn all this.
optimus_prime1
24-Dec-10 1:15am
View
That actually did solve but what I earlier used getline was like this: cin.getline(ch,256);
How should I have known to use getline(cin,text, '\n')? :-/
optimus_prime1
24-Dec-10 1:12am
View
So, basically both of my above functions were call by reference? Although pointers use should be avoided?
optimus_prime1
24-Dec-10 0:16am
View
#include <iostream>
#include<string>
#include<cstring>
using namespace std;
int main()
{
string text;
cin>>text;
cout<<text.length();
return 0;
}
Input: How are you?
Output: 3
Screenshot: http://img802.imageshack.us/img802/8473/scr.png
I don't think text.length() is counting the whole string when I giving a string at the runtime...
However, if I write string text = "How are you?", then it will give the answer as 12.
optimus_prime1
24-Dec-10 0:09am
View
A console app
optimus_prime1
23-Dec-10 10:41am
View
You mean text.length() is not correct? or text.length() does count length of the string including spaces?
(btw, I am trying Win32 console and not MFC)
optimus_prime1
23-Dec-10 10:38am
View
Ya! trying programs from the book but sometimes mess up... :-/
optimus_prime1
23-Dec-10 9:06am
View
I actually wrote the problem in the code comment. Sorry about this :|
optimus_prime1
23-Dec-10 9:03am
View
Actually, that puts up two elements extra in my reversed list. So, if enter 2 3 4 5 6 7.
I get the output 7 6 5 4 3 2 1 0.
optimus_prime1
23-Dec-10 8:02am
View
As I read somewhere, when we declare stack < int > numbers , we are doing an implicit initialization of the stack and the stack is automatically initialized to be empty.
Secondly, if I try I simple program to reverse the int list, numbers.top() and subsequently numbers.pop() work properly to give the desired result.
optimus_prime1
23-Dec-10 7:40am
View
It crahes as soon as run this. (using CodeBlocks)
optimus_prime1
22-Dec-10 14:58pm
View
Oh thanks again! Actually learning this stuff myself!
optimus_prime1
22-Dec-10 14:46pm
View
:O
Does that mean
for(i=0;i=5;i++) - Invalid
for(i=0;i==5;i++) - Invalid
for(i=0;i<=5;i++) - Valid
optimus_prime1
22-Dec-10 14:20pm
View
It doesn't even take the input at the beginning and neither give any error message.
I uncommented a part in the main to see the working of only configuration::initialize(). But no input is accepted and no output is given.
If required, here's the downloadable project. (271 kB) http://cid-7cfad5624f27df6f.office.live.com/self.aspx/.Public/GameofLife.zip
optimus_prime1
21-Dec-10 10:59am
View
No, its not the Visual C++
optimus_prime1
16-Oct-10 11:56am
View
And could you please help in the other two problems too?
optimus_prime1
16-Oct-10 4:06am
View
How do we store color in the XML file.
I think color is not serializable and we have to make the Color class serializable but how how do I do this in this sample.
Thanks!
optimus_prime1
16-Oct-10 3:44am
View
Although, I have set the SizeMode if Picture to Zoom, but still the loaded pictures come in size smaller than the size they were saved?
What am I doing wrong?
optimus_prime1
16-Oct-10 3:15am
View
Many thanks for your help!
I had further question regarding storing a .wav in the same XML file.
A picture box can have a Tag associated with it or a 'Recorded .wav'.
The recorded wav comes from Form2.
If the user records the sound and even gives the tag to the picture, then preference is given to the saving/playing the sound.
How do I save and load this wav in the XML file?
Thanks!
optimus_prime1
13-Oct-10 9:39am
View
I had already tried that. The panel I have used has TableLayoutPanel inside it. Panel's Auto size property is true. When the Panel is anchored to Top, Left (by default), the TableLayout forms rows and columns which are equal in width and height.
However, when I anchor the Panel to all the sides, the TableLayoutPanel inside the Panel doesn't form rows and columns which are equal in size. Any suggestions.
optimus_prime1
11-Oct-10 9:12am
View
As I answered to Rajiv Lipu's post, the problem remains the same.
optimus_prime1
10-Oct-10 10:46am
View
In other case, if I would have use a 'Panel' which has a TabIndex property. I wanted to set the TabIndex property of the Panels starting 0 from the first Panel created in the above code and 'last' for the last Panel created.
optimus_prime1
10-Oct-10 10:41am
View
PictureBoxes don't have TabIndex property. :-|
optimus_prime1
10-Oct-10 8:39am
View
Tried, but it remains the same. :-|
optimus_prime1
9-Oct-10 8:23am
View
Hi,
Thanks for the reply.
The images problem is solved but the main issue now is that on pressing the "Start Recording button", nothing happens and similar is the case with Stop Recording. Play button also doesn't do anything :o/
optimus_prime1
6-Oct-10 5:08am
View
Hi,
Thanks!
Thanks a lot for the ingenious sample. I improvised the program a bit but Load is not operative correctly in my program.
Here's a sample program in which I tried things.
http://www.mediafire.com/?wcb4btj0p83zm5z
P.S Apart from this (off topic), if you could also look for slight modifications that might be needed in the program such as TableLayout Dock problem, anchor problem with controls, TableLayout Cell Width and Height adjustment, Fitting an image into the PicBox etc.
Sending the picture back to the picture box worked in my program. However, I wasn't able to send the Label back to the corresponding cell in which each it is contained (in Form1). Further, I have also have to send the Text from Form2 as PictureBox Tag in Form1.
I would be greatful for help.
Thanks a lot!
optimus_prime1
5-Oct-10 3:05am
View
Thanks a lot for the efforts!
I needed to clarify somethings. Hope you won't mind answering them
In the Form1 code, wherever, I have used the Output class,
Output.Save("output.out");
Output.Person
Output.Load("output.out")
gives me an error:
Error: An object reference is required for the non-static field, method, or property 'YourNamespace.Output.Save(string)'
optimus_prime1
5-Oct-10 1:20am
View
I know it feels like spoon feeding but I haven't been able to do it. I am not a pro and the learning process is still stumpy :( :(
It would be more valuable if you could amend the above sample (link in my original post) according to your notion.
optimus_prime1
4-Oct-10 22:53pm
View
"List<customer> customer_list;
while saving the list in Xml (Simple Serialization) you can change the index according to the position in the TableLayoutPanel and you can keep track."
Actually, I wasn't sure on how to change the index for different columns and rows in the TableLayout.
I would be really very thankful if you could modify the above program accordingly to save and load contents to make that evident.
Kindest Regards
Show More