Forum: DaniWeb Community Feedback 4 Hours Ago |
| Replies: 5 Views: 54 |
Forum: C++ 6 Hours Ago |
| Replies: 1 Views: 38 Step 1: Create a console project. File --> New --> Project. Project types: select Win32. Templates: select "Win32 Console Application". Near the bottom of the screen enter a project name and... |
Forum: C++ 6 Hours Ago |
| Replies: 1 Views: 32 This is a very simple programming problem which can be done with only 8 lines of code! All you have to do is create an array of 255 ints then use each letter of the string as an index into the... |
Forum: DaniWeb Community Feedback 7 Hours Ago |
| Replies: 5 Views: 54 Since its no longer possible to use code tags without line numbers, suggest you change quote tags to retain spaces and tabs like code tags. I'm a little surprised that was not how quote tags should... |
Forum: C++ 7 Hours Ago |
| Replies: 1 Views: 47 the output you posted is wrong. Here is the correct output. Had you bothered to compile and run that program you would have seen it too.
The contents of the array are :
1 5 ... |
Forum: C 13 Hours Ago |
| Replies: 4 Views: 69 I would use a typedef
#ifdef SIZE_32
typedef __int32 inttype;
#else
typedef __int64 inttype;
#endif
int main() |
Forum: C++ 14 Hours Ago |
| Replies: 2 Views: 69 Suggestion: Create a web site using MySQL database that stores member information. |
Forum: C++ 14 Hours Ago |
| Replies: 1 Views: 50 The functions in time.h aren't at all difficult to use -- you just need to read about the different functions.
time() -- returns the current time in seconds since 1970. It returns the time in... |
Forum: Geeks' Lounge 1 Day Ago |
| Replies: 7 Views: 254 I'm PG-13 rated. I hate potty-mouthed comedians/movies. |
Forum: DaniWeb Community Feedback 1 Day Ago |
| Replies: 4 Views: 153 Yes, Dani made that change a few weeks ago. |
Forum: C++ 1 Day Ago |
| Replies: 2 Views: 78 line 17 is probably the wrong way to determine if the file is empty or not. What you should do is seek to end of file then get the file position.
instaffile.seekg(0, ios::end);
size_t sz =... |
Forum: C++ 1 Day Ago |
| Replies: 3 Views: 116 You created a windows gui project, not a windows console project. Start again, but this time create the right kind of project. |
Forum: Geeks' Lounge 2 Days Ago |
| Replies: 28 Views: 587 What is a netbook? Never heard of that. :) |
Forum: DaniWeb Community Feedback 2 Days Ago |
| Replies: 88 Views: 4,135 I suspect the larger buttons are to help newbes figure out how to post a new thread or a response to an existing thread. I've seen comments by a few people who didn't know how to do that most likely... |
Forum: C 2 Days Ago |
| Replies: 8 Views: 61,921 That is only true when using scanf(). Both gets() nor fgets() extract the '\n' from the keyboard buffer. |
Forum: C++ 2 Days Ago |
| Replies: 4 Views: 96 The parameter to open() has to be a null-terminated character array (commonly called a string). All you are trying to send it is a single character. Try this:
int main()
{
int i;
char*... |
Forum: C++ 2 Days Ago |
| Replies: 5 Views: 113 win32 api was written in C so that it can be called from lots of other programming languages.
>>Does it mean I have to sell OOP for procedural C or wha
Yes, unless you want to use something... |
Forum: C++ 2 Days Ago |
| Replies: 3 Views: 836 You don't need those loops in readb() and writeb(). All it takes is one line of code, using fread() and fwrite(). |
Forum: C++ 2 Days Ago |
| Replies: 6 Views: 161 Yes, that is another way to do it, but not the only way. Overloading the operators would take more processing time because the program would have to read/write the structures/classes one at a time. ... |
Forum: C++ 2 Days Ago |
| Replies: 6 Views: 161 >>.btw,isnt there (char*)&B?
NO. B is already a pointer, so what you would create is a pointer to a pointer.
You didn't post the entire program so I can't help you more. I have no clue what... |
Forum: Windows Vista and Windows 7 3 Days Ago |
| Replies: 12 Views: 276 I had a similar problem when I tried to install Windows 95, SP1. The sp1 install failed but could not uninstall 95. I finally found a work-around by reinstalling 95 from original CD, then Control... |
Forum: C++ 3 Days Ago |
| Replies: 4 Views: 130 When you enter an integer the program leaves the <Enter> key '\n' in the keyboard buffer so the next getline() will just extract it instead of waiting for more keyboard input. You need to flush that... |
Forum: Windows Vista and Windows 7 3 Days Ago |
| Replies: 5 Views: 250 use regedit to see what permissions are set for the sub-key where you want to create a new key. You might not have permissions to do that. |
Forum: Windows Vista and Windows 7 3 Days Ago |
| Replies: 13 Views: 371 Windows 7 itself contains a program that resizes the partition. If you can install Windows 7 then go to Control Panel --> System and Security --> Administrative Tools --> Computer Management -->... |
Forum: Windows Vista and Windows 7 3 Days Ago |
| Replies: 4 Views: 212 Illegal software, so its just as well you can't use it on Windows 7.
SNIP |
Forum: Windows Vista and Windows 7 3 Days Ago |
| Replies: 12 Views: 276 Was you logged in as an Administrator when it was first installed? You may have to uninstall it then download and reinstall it again. |
Forum: C++ 3 Days Ago |
| Replies: 6 Views: 161 In that case you will probably have to create your own database if IC numbers and related ages. Just use a standard text editor to create it, something like this where the first column is an IC... |
Forum: C++ 3 Days Ago |
| Replies: 6 Views: 161 didn't your instructor tell you where that IC number comes from? AFAIK there is no online database of IC numbers. |
Forum: C++ 3 Days Ago |
| Replies: 6 Views: 161 line 48: it is not reading the value of n from the data file. You need to put f >> n; between lines 47 and 48.
delete line 49 because that's the default when files are opened for reading.
... |
Forum: C++ 4 Days Ago |
| Replies: 11 Views: 203 make the function averate() return the average so that main() can determine whether it is pass or fail.
int average(int n)
{
...
... <snip>
return sum/num;
} |
Forum: Geeks' Lounge 4 Days Ago |
| Replies: 295 Views: 20,330 Mendelssohn gretest hits (http://www.amazon.com/Mendelssohn-Greatest-Hits-Milan-Turkovic/dp/B000002A9I) |
Forum: Geeks' Lounge 4 Days Ago |
| Replies: 28 Views: 587 Vista has a firewall, so I suspect Windows 7 does too. There was nothing mentioned about it or antivirus during installation, unless I missed it. |
Forum: C++ 4 Days Ago |
| Replies: 9 Views: 157 Read the file one word at a time, instead of one charcter at a time. If the word contains digits then convert the entire word to int so that "10" becomed 10. line 10 should be an array of ints, not... |
Forum: Geeks' Lounge 4 Days Ago |
| Replies: 28 Views: 587 Yes of course you will still need those. Windows 7 does not make all those antivirus programs obsolete. |
Forum: C++ 4 Days Ago |
| Replies: 1 Views: 120 Here is one way to do it
#include <string>
#include <sstream>
using namespace std;
int main()
{
string s = "Adder: 4, yes"; |
Forum: C++ 4 Days Ago |
| Replies: 2 Views: 128 Your description of the problem is somewhat unclear. What does "and as how many times user" mean?
>>i have written some code, please see it and correct it :
What is wrong with it? Are you... |
Forum: C++ 4 Days Ago |
| Replies: 4 Views: 117 >>res=stmt->executeQuery("select * from test2 where english="str1"");
That has two problems:
1) "str1": you have to escape the double quotes. \"str1\"
2) The string has to be properly... |
Forum: Windows Vista and Windows 7 4 Days Ago |
| Replies: 12 Views: 276 Do you have antivirus and antispyware programs running on the computer? If not then you need to get them. |
Forum: DaniWeb Community Feedback 4 Days Ago |
| Replies: 88 Views: 4,135 I haven't had any problems today, but yesterday morning was pretty slow. |
Forum: C++ 4 Days Ago |
| Replies: 4 Views: 117 I don't see anything wrong with it -- but did you post exactly the same thing that is in your program? Maybe you need to post more of the program. |