473,595 Members | 2,474 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Warning C4244 while compiling (using vc 2005)

5 New Member
Hi
I am new to vc++. currently using VC 2005 version 8
Someone help me solve this.

lpppublishdimin cent.cpp(294) : warning C4244: 'argument' : conversion from 'const lpmINT64' to 'char', possible loss of data

the code i have written is :
lmSTRING retStr = "\n [Published = " ;
retStr += m_pubDivi;
retStr += "Pub Divisor =" ;
retStr += m_pubDivisor;
retStr += " Pub Dim = ";
retStr += m_pubDim;
retStr += "] \n";

m_pubDivi , m_pubDivisor & m_pubDim is declared as a int64.

Thanks
Dec 7 '06 #1
0 892

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

Similar topics

29
1977
by: Daniel Rudy | last post by:
Hello, Consider the following code fragment: fileptr = fopen(param->filename, "r"); if (fileptr == NULL) { error("digest.c: digest_file: Open File ", errno); return(-2); }
3
2552
by: Bill Burris | last post by:
How do I find what is causing this warning from the Linker? If I use /NODEFAULTLIB I get hundreds of undefined symbols. LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library Here is the compiler options: /Od /I "C:\DriverX4\Include" /I "..\ThreadLib" /AI "..\Utility\bin\Debug" /AI "..\Logging\bin\Debug" /AI "Debug" /D "WIN32" /D "_DEBUG" /D "_WINDLL"
1
1343
by: Josué Andrade Gomes | last post by:
Take this code: 1: int main() 2: { 3: unsigned short x = { 1, 2, 3, 4, 5 }; 4: unsigned short sum = 0; 5: 6: for (int i = 0; i < 5; ++i) { 7: sum += x; 8: } 9: }
11
1749
by: Henryk | last post by:
I have some very simple code fragment: short int n1, n2; .... n1 += n2; I get an warning from VS2003 - VS2005: warning C4244: '+=' : conversion from 'int' to 'short', possible loss of data n1 = n1 + n2;
6
2366
by: Bart Simpson | last post by:
I am writing a shared object (Dll in Windows) and I am making extensive use of the STL. I am getting lots of warnings like this: ClassA.h(139): warning C4251: 'ClassA::indexarray' : class 'std::vector<_Ty>' needs to have dll-interface to be used by clients of class 'ClassA' with
3
3413
by: Edward Diener | last post by:
I am getting the above warning when compiling a line in a file which assigns an 'intptr_t' result to a 'long' variable. I do not see how intptr_t can possibly be larger than a long unless intptr_t is a 64 bit value and I know I am not compiling for 64 bit Windows.
1
4323
by: zelmila19 | last post by:
Hello, this part of my program: int shotDistance(int a) { int min = a * .8, max = a * 1.2; //Defines the minimum and maximum range of the club. srand ((unsigned int) time(NULL)); a = min + (rand() % (max - min)) ; //calculates the random shot distance. return a; //returns the distance to main(). }
21
3357
by: Roman Mashak | last post by:
Hello, given a simple code: #include <math.h> long hyp(long height, long base) { return sqrt(height * height + base * base); }
2
2609
by: david | last post by:
I've noticed that the following compiles (as C) under both VS8 and gcc with no warnings, even though there's a possibility of data truncation from enum to unsigned char. It does generate a warning under VS6, however. Under VS8, I enabled run-time checks, including /RTCc (smaller type check), but still no warning. The only way I can get a warning under VS8 is if I configure it to compile as C++. Two questions: (1) why doesn't /RTCc...
0
7955
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7883
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8261
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8379
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
6674
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5418
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3911
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2391
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1223
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.