473,405 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

trouble with compiling my program

19
Hi here is my problem when I compile my program it gives me the error " error C2296: '%' : illegal, left operand has type 'double". any help in explaining this is much appreciated.
Expand|Select|Wrap|Line Numbers
  1.  
  2. quot = n1 / n2;
  3. mod = n1 % n2;
  4.  
  5.  
Nov 16 '08 #1
2 1209
boxfish
469 Expert 256MB
The modulus operator can only be used with two ints.
Nov 16 '08 #2
jmf777
19
oh duh thanks for the help.
Nov 16 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Morten Rodal | last post by:
#include <iostream> #include <fstream> using namespace std; #ifndef BUFSIZ #define BUFSIZ 1024 #endif int main(int argc, char **argv) {
3
by: Ney André de Mello Zunino | last post by:
Hello. I am having trouble with namespaces and unresolved externals. The following three files (memoria.h, memoria.cpp and teste.cpp) illustrate the problem: // *************** memoria.h...
7
by: crowl | last post by:
VS.2003, .NET Framework 1.1, C# My goal: Creating a dll (helper.dll) which contains some UserControls and some other helpful classes in order to use it in other projects. Symtoms: The...
5
by: Marcelo Gosling | last post by:
Hi, everyone. This is on WinXP SP2, with Python 2.4.3 and DJGPP gcc 4.1.0. I'm having trouble including Python.h in a C file. The following C code: #include "Python.h" int main()
1
TMS
by: TMS | last post by:
I'm trying to write an address book that is based on a binary tree. I'm devloping in Visual C++ (I blew up my Ubuntu with the new dist, so no EMACS), starting with the basics: #ifndef...
2
by: robert | last post by:
I've trouble compiling win32all. VC98 and latest SDK installed (otherwise with original SDK it won't even compile). It tells that uuid.lib(cguid_i.obj) : fatal error LNK1103: debug info is...
12
by: Santosh Krisnan | last post by:
hello all, I fiddled with BASIC in the early 90s but left it at that. Now I am trying to learn C. I tried to solve an exercise in my book, but it failes to compile. Can anyone tell me what the...
10
by: Tomás Ó hÉilidhe | last post by:
I'd post this on a gcc newsgroup but I'd be more productive talking to the wall. Anyway, let's say someone throws some source code at you for a particular program and says, "Just compile it, it...
3
by: plbaldri | last post by:
I have written a very simple and basic program for an intro Comp Sci class and am having trouble with it crashing. The program needs to accept a filename on the command line at the prompt and has to...
1
by: c.splittgerber | last post by:
We have some trouble with C-written application and UDF on 64-bit Windows ... Given the following production environment: - Windows 2003 Server on AMD64 - Microsoft C/C++ Compiler of Visual...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.