15,300 Posted Topics

Member Avatar for rathiikk
Member Avatar for Minimalist
0
337
Member Avatar for johnykf

>im afraid if i understood this assignment unproperly: Seems pretty clear assignment to me. What part don't you understand? Since you have to work with each digit of the number it would probably be easier to get the number as a string instead of an integer. It can be done …

Member Avatar for David W
0
195
Member Avatar for joseph.suanino
Member Avatar for Stanley_3
Member Avatar for Emmaximum

Dev-C++ is nothing more than an IDE -- it's not a compiler. MinGW is the compiler that is supplied with Dev-C++, same compiler that is supplied with Code::Blocks IDE. And MinGW is the Windows port of \*nix gcc and g++ from GNU.

Member Avatar for Ancient Dragon
0
295
Member Avatar for Curious Gorge

[Here](http://www.amazon.com/s/?ie=UTF8&keywords=visual+studio+2013&tag=googhydr-20&index=aps&hvadid=27634687687&hvpos=1t1&hvexid=&hvnetw=g&hvrand=20875496881860501544&hvpone=&hvptwo=&hvqmt=b&hvdev=c&ref=pd_sl_oadshh8sx_b) are some books that may help you. Experience is probably the best teacher. IMO most of the features of Visual Studio are just fluff, the best and most useful feature is it's debugger. One feature I don't like is it's dockable windows -- I'm always accidently undocking one of …

Member Avatar for Curious Gorge
0
286
Member Avatar for amitesh11
Member Avatar for Ancient Dragon

Anyone know where to BUY (not steal) this eBook? I don't want paperback because they are too difficult for me to read. I'd rather have eBook or PDF version so that I can change the font size to whatever I want. I've looked at Addison-Wesley web site but don't see …

Member Avatar for mike_2000_17
0
172
Member Avatar for TheFearful

What are you confused about? for i ← 0 to n − 1 do In c++ this would be `for(i = 0; i < n-1; ;)` or it could be coded as a do loop int i = 0; do { // something } while( i < n-1);

Member Avatar for Schol-R-LEA
0
321
Member Avatar for Sreya_1

There are lots of sorting algorithms, c++ even has one. Are you allowed to use the standard c++ std::sort function? If not, then probably the simplest one to code is the [bubble sort](http://en.wikipedia.org/wiki/Bubble_sort). The bubble sort is among the slowest of the sort algorithms, but for small sets of data …

Member Avatar for Banfa
0
146
Member Avatar for PHANI BHUSHAN

I'd recommend you learn VB.NET instead of a 15-20 year old compiler like VB 6.0. You can get VB.NET Express for free, just download it from Microsoft. There are lots of online tutorials for it too. \ See [this wiki article](http://en.wikipedia.org/wiki/Visual_Basic) about history of vb.

Member Avatar for IconKana
0
119
Member Avatar for mystycs

Is input[1] just a single numeric digit? If it is, then you don't need any conversion program, just subtract '0' to convert it to integer. For example: char input[] = "X1"; int x = input[1] - '0';

Member Avatar for tinstaafl
0
330
Member Avatar for ahmedsa

Do you mean the function on line 154? What constitutes end-of-line? Does the machine sending the weights append '\n' or something to indicate end-of-line? You don't have any control over that, so if you want all the weights on one line then save them into your own string when received. …

Member Avatar for ahmedsa
0
1K
Member Avatar for trantran

The problem with that is FindFirstFile and FindNextFile know nothing about std::vector, or even c++. Those are just C functions. In order to make your suggestion work you would first have to resize the vector with enough entries to hold all the files that those two C functions might return, …

Member Avatar for mike_2000_17
0
179
Member Avatar for SkyCross

you might want to display those two strings or write them to a temp file so that you can see exactly what is being sent to the database.

Member Avatar for cgeier
0
505
Member Avatar for Sifiso21031085

I think electronic voting has been proven to be even less reliable then paper voting either because of bugs in the electronic software or hackers. It wouldn't be difficult for a programmer to write the software which auto votes for a particular candidate regardless of who the voter intended. That …

Member Avatar for mike_2000_17
0
595
Member Avatar for Aljaz

"%c" only gets one character from the keyboard. I see the structure contains several character arrays, so "%s" is probably more appropriate. Also, it's not necessary to use & before character arrays because they are already passed as pointer by default. For example `scanf("%s",stud.vpisna_st);`

Member Avatar for Aljaz
0
227
Member Avatar for happygeek

If anyone owns the intellectual property of "Sky" is has to be American TV [NBC who ran the TV series "Sky King" in the early 1950s.](http://en.wikipedia.org/wiki/Sky_King) It was a ratio broadcase before that.

Member Avatar for Ancient Dragon
2
796
Member Avatar for sandeepxd
Member Avatar for Stuugie

If there is a WW3 it won't last long. There's enough nukes in the world to destroy the planet several times over in just a few minutes. So you won't have to worry about WW3 very long.

Member Avatar for Ancient Dragon
0
125
Member Avatar for butterfingerss

I looked over the options in Visual Studio 2013 and, as far as I can tell, only MFC programs can be statically linked to the MFC dlls. None of the other program types have that option.

Member Avatar for butterfingerss
0
264
Member Avatar for kronos2

If he doesn't have access to the server how is he supposed to calculate consumption? That's like me wanting to make similar approximation of the DaniWeb servers -- no way for me to do it.

Member Avatar for Ewald Horn
0
125
Member Avatar for cazmere

No -- there's no one here that knows how to program :) And if you believe that I have some shares in the Golden Gate Bridge that I'll be glad to sell you.

Member Avatar for rubberman
0
89
Member Avatar for shaneetra.graham
Member Avatar for Ancient Dragon
0
80
Member Avatar for cppgangster

Or just do it like this: void zeroMatrix(float arr[][2]); void main() { float e[2][2]; zeroMatrix(e); } void zeroMatrix(float arr[][2]) { int i, j; for (i = 0; i<2; i++) { for (j = 0; j<2; j++) { *(*(arr + i) + j) = 0; } } }

Member Avatar for David W
0
343
Member Avatar for Teezy7
Re: MVC

Did you try [this](http://lmgtfy.com/?q=mvc+programming+c%23)?

Member Avatar for Ancient Dragon
0
83
Member Avatar for ThandekaN
Member Avatar for ThandekaN
Member Avatar for Ancient Dragon
0
49
Member Avatar for ThandekaN
Member Avatar for shaneetra.graham

You can't unless you also write your own file system, which I doubt you will want to do. The CD command is only good while the program is still running. After the program terminated the current directory reverts back to whatever it was before the program started. AFAIK there is …

Member Avatar for Ancient Dragon
0
500
Member Avatar for billionhbaire
Member Avatar for blue_Student

reverse lines 4 and 5, then lines 15 and 16. The purpose of lines 4 and 15 is to remove the '\n' from the keyboard buffer after calling scanf(). You need to do the same after line 33.

Member Avatar for Ancient Dragon
0
518
Member Avatar for Adox

It's still just fopen() regardless of where the file is located, for example `FILE* fp = fopen("c:\\documents\\test.txt","r");` In your program you will need to get the string as a character array because it comes from keyboard char inbuf[255]; fgets(inbuf,sizeof(inbuf),stdin); // get string from keyboard // now clear trailing '\n' if(inbuf[strlen(inbuf)-1] …

Member Avatar for rubberman
0
230
Member Avatar for chubbyy.putto

line 14 won't work because you have to also enter the / between the numbers. Get the input as a string then parse the string to extract each of the individual parts.

Member Avatar for David W
0
1K
Member Avatar for oanahmed

> how software is converted into electrical pulses or 0's and 1's in computer. How does the computer do it? The computer itself doesn't do it, it's converted from human readable text into computer usable instructions with a compiler or interpreter. As for your other questions, someone else will have …

Member Avatar for mike_2000_17
0
265
Member Avatar for Tsaou

You have static data in some of the classes that also need to be declared globally in one of the \*cpp files. Static class data is just like normal global data except they contain the class scope operator. For example you might declare them in main.cpp like this example #include …

Member Avatar for Ancient Dragon
0
511
Member Avatar for shaneetra.graham

what do you mean cd doesn't work ? Explain more about the behavior that you think is wrong.

Member Avatar for JasonHippy
0
223
Member Avatar for CHETNA_1

Change the return type of each function to return the value of c and y, then in the third function you can get those values to compare them. Something like this: int foo1() { int c = 5; return c; } int foo2() { int y = 0; return y; …

Member Avatar for panqnik
0
162
Member Avatar for aronno.amin
Re: c++

Study and work full time with c++ for about 10 years and you will become a master at it.

Member Avatar for panqnik
0
176
Member Avatar for shaneetra.graham

You can't make it into a switch statement. switch only works on integers, never stings.

Member Avatar for shaneetra.graham
0
119
Member Avatar for rock9449

First do the math on paper & pencil. Once you get that right then coding it will be simple. If the hours is greater than 12 just subtract 12 and the A.M./P.M. flag will be 'P'. Otherwise if the hours is less than 12 the flag will be 'A' and …

Member Avatar for deceptikon
0
8K
Member Avatar for Sara Masri

google for c++ keywords and you will find [this article](http://cs.smu.ca/~porter/csc/ref/cpp_keywords.html)

Member Avatar for Ancient Dragon
0
190
Member Avatar for shaneetra.graham

There are a few errors in the code you posted, such as lines 17 and 23. Line 24 is inside the if statement that begins on line 23.

Member Avatar for Ancient Dragon
0
174
Member Avatar for getmeusername

Some compilers complain if the include files you create are in quote or angle bracks `#include "client.h"` Use quotes if client.h is in the same folder as your \*.c file(s) `#include <client.h>` Use angle brackets if client.h is in the compiler's include folder.

Member Avatar for Ancient Dragon
0
200
Member Avatar for alaa_5
Re: info

>i hope it usefull for you It's not -- have no idea what you're talking about.

Member Avatar for Ancient Dragon
0
22
Member Avatar for (Z!Z!)

This is the start of the function, now all you have to do is create two nested loops. The outermost loop iterated from 0 to 6 which displays the compainies, and the inner loop counts from 0 to 4, displaying each of the sales on the same line as the …

Member Avatar for (Z!Z!)
0
203
Member Avatar for Reverend Jim

I use Chrome Version 33.0.1750.146 m on 64-bit Windows 8.1 and don't have that issue. Your screenshot looks like you have two instances of Chrome, one on top of the other. Check Task Manager and see if that's the case.

Member Avatar for Reverend Jim
0
271
Member Avatar for buixuanhai

The problem is that there is no memory allocated to the members of that structure -- they are just pointers whose address is unknown. cin does not allocate memory -- that is your responsibility. Try this structure struct Student { char firstName[100]; char lastName[100]; char telephone[20]; }; line 22: why …

Member Avatar for David W
0
733
Member Avatar for Aryeh1

>Download anything on the internet and you will have uninvited guests. Depends on where you browse and download from. If you download illegal stuff then yes, you will most likely get viruses and malware.

Member Avatar for Ancient Dragon
0
130
Member Avatar for Sifiso21031085

"Coding Academy" -- just another catchy phrase for online tutorial. Do you have one in mind? Post a link to it so we can see what you are talking about. IMY get one of the programming books from Amazon.com or your local book store. They contain much better and more …

Member Avatar for veedeoo
0
130

The End.