Thursday, 8 March 2007
|
| Fwd: SQL integration with C++ FiRe 10:20:07 |
| | ---------- Forwarded message ---------- From: FiRe < bhratbrij-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [mailto:bhratbrij-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org]> Date: Dec 28, 2005 8:54 PM Subject: SQL integration with C++ To: c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org [mailto:c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org]
HI everyone..
I have a project in my college in which i have to integrate c++ with a database (sql) as back end. I have no clue how to do it? I have google it a lot but could only find VC++ integraton with sql not c++. So,please help me.
CHEERS.....
BHRAT BRIJ
-- FiRe
-- FiRe
To unsubscribe, send a blank message to <mailto:c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org>.
SPONSORED LINKS
Basic programming language [http://groups.yahoo.com/gads?t=ms&k=Basic+programming+language&w1=Basic+programming+language&w2=C+programming+language&w3=Computer+programming+languages&w4=Programming+languages&w5=Java+programming+language&c=5&s=154&.sig=oYSjvOQeCk9m-PS6-d-YNA]
C programming language [http://groups.yahoo.com/gads?t=ms&k=C+programming+language&w1=Basic+programming+language&w2=C+programming+language&w3=Computer+programming+languages&w4=Programming+languages&w5=Java+programming+language&c=5&s=154&.sig=wZpGv_HSvSgp3_01mjn3yQ]
Computer programming languages [http://groups.yahoo.com/gads?t=ms&k=Computer+programming+languages&w1=Basic+programming+language&w2=C+programming+language&w3=Computer+programming+languages&w4=Programming+languages&w5=Java+programming+language&c=5&s=154&.sig=3_q8I6iDGyK-I1--1yamPQ]
Programming languages [http://groups.yahoo.com/gads?t=ms&k=Programming+languages&w1=Basic+programming+language&w2=C+programming+language&w3=Computer+programming+languages&w4=Programming+languages&w5=Java+programming+language&c=5&s=154&.sig=U-b0dJRkunjngqDnX2RaRQ]
Java programming language [http://groups.yahoo.com/gads?t=ms&k=Java+programming+language&w1=Basic+programming+language&w2=C+programming+language&w3=Computer+programming+languages&w4=Programming+languages&w5=Java+programming+language&c=5&s=154&.sig=CNOzV99vrCrQEyQFT5znGw]
---------------------------------------------------------------------
YAHOO! GROUPS LINKS
* Visit your group " c-prog [http://groups.yahoo.com/group/c-prog]" on the web.
* To unsubscribe from this group, send an email to: c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org [mailto:c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org?subject=Unsubscribe]
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service [http://docs.yahoo.com/info/terms/].
---------------------------------------------------------------------
|
| | 13 answers | Add comment |
Tuesday, 13 February 2007
|
| old inport, outport Maurice 13:20:25 |
| | Hello: I've made a program that command external hardware using the parallel port, everything was ok under win98. Now I've tried it under windows xp, it didn't work. (I use inport() and ouport() functions).
Any idea?? thanks Maurice
|
| | 1 answer | Add comment |
|
| [ROOT] Loading a user-defined function in ROOT Germano Percossi 03:00:59 |
| | Hi everybody, I've subscribed only a few time ago this ML and surely this question has been answered in another thread. I apologize in advance if this is the case. Anyway, I have some problems loading a function written by me; I load the function with
gROOT->LoadMacro("name_of_file_of_my_func")
with previous versions I used .L to load it. If I'd need to change my function is there a way to unload the old one and load a new one? Till now I load the new one with the same name, hoping to do the right thing but typing
root [56] gROOT->GetListOfGlobalFunctions()->ls()
I had the errors written at the end of the e-mail and I cannot do anything else than kill root from another shell. I've done anything wrong? Is there any workaround? I'm running a precompiled version of root (v4.00.04 with gcc 3.3.2) on a Linux machine with gcc 3.4.1.
Greets, Germano Percossi
*** Break *** segmentation violation Generating stack trace... 0x406470f7 in G__interpret_func + 0x1692 from /usr/local/root/lib/libCint.so 0x4063cc83 in G__compile_bytecode + 0x203 from /usr/local/root/lib/libCint.so 0x406cad05 in G__MethodInfo::GetBytecode() + 0x5d from /usr/local/root/lib/libCint.so 0x4018baff in TFunction::InterfaceMethod() const + 0x31 from /usr/local/root/lib/libCore.so 0x4017a011 in TCint::UpdateListOfGlobalFunctions() + 0x111 from /usr/local/root/lib/libCore.so 0x40139b04 in TROOT::GetListOfGlobalFunctions(bool) + 0xac from /usr/local/root/lib/libCore.so 0x402c7788 in <unknown> from /usr/local/root/lib/libCore.so 0x40656373 in G__call_cppfunc + 0x258 from /usr/local/root/lib/libCint.so 0x40646163 in G__interpret_func + 0x6fe from /usr/local/root/lib/libCint.so 0x4062b1d5 in G__getfunction + 0x12b4 from /usr/local/root/lib/libCint.so 0x406b335a in G__getstructmem + 0x235 from /usr/local/root/lib/libCint.so 0x406aca12 in G__getvariable + 0x4a9 from /usr/local/root/lib/libCint.so 0x406b38c9 in G__getstructmem + 0x7a4 from /usr/local/root/lib/libCint.so 0x406aca12 in G__getvariable + 0x4a9 from /usr/local/root/lib/libCint.so 0x406228fe in G__getitem + 0x5bf from /usr/local/root/lib/libCint.so 0x40621524 in G__getexpr + 0x77ec from /usr/local/root/lib/libCint.so 0x4066bad2 in G__exec_function + 0x1d5 from /usr/local/root/lib/libCint.so 0x40672619 in G__exec_statement + 0x23bd from /usr/local/root/lib/libCint.so 0x4060ab1d in G__exec_tempfile_core + 0x2bd from /usr/local/root/lib/libCint.so 0x4060acee in G__exec_tempfile_fp + 0x22 from /usr/local/root/lib/libCint.so 0x4067a767 in G__process_cmd + 0x471a from /usr/local/root/lib/libCint.so 0x401799bf in TCint::ProcessLine(char const*, TInterpreter::EErrorCode*) + 0xa9 from /usr/local/root/lib/libCore.so 0x400f1470 in TApplication::ProcessLine(char const*, bool, int*) + 0x596 from /usr/local/root/lib/libCore.so 0x40e74f4f in TRint::HandleTermInput() + 0x1dd from /usr/local/root/lib/libRint.so 0x40e73d3a in TTermInputHandler::Notify() + 0x24 from /usr/local/root/lib/libRint.so 0x40e759de in TTermInputHandler::ReadNotify() + 0x12 from /usr/local/root/lib/libRint.so 0x401e6388 in TUnixSystem::CheckDescriptors() + 0xf2 from /usr/local/root/lib/libCore.so 0x401e5bdd in TUnixSystem::DispatchOneEvent(bool) + 0xf7 from /usr/local/root/lib/libCore.so 0x40147df0 in TSystem::InnerLoop() + 0x18 from /usr/local/root/lib/libCore.so 0x40147d95 in TSystem::Run() + 0x6f from /usr/local/root/lib/libCore.so 0x400f2069 in TApplication::Run(bool) + 0x2d from /usr/local/root/lib/libCore.so 0x40e74a2e in TRint::Run(bool) + 0x30a from /usr/local/root/lib/libRint.so 0x08048e45 in main + 0x71 from /usr/local/root/bin/root.exe 0x40fb6ea0 in __libc_start_main + 0xe0 from /lib/tls/libc.so.6 0x08048d45 in TApplicationImp::ShowMembers(TMemberInspector&, char*) + 0x31 from /usr/local/root/bin/root.exe Root > Function Energy() busy flag cleared Function () busy flag cleared Function () busy flag cleared Function () busy flag cleared Function () busy flag cleared Function () busy flag cleared Function () busy flag cleared
-- \ | / (@ @) -o00-(_)-00o------------ ------------------------------------------------------------ Germano Percossi University of Rome "Tor Vergata" and INFN Roma2 Via della Ricerca Scientifica 1 I-00133 Rome Italy Phone : 06 7259 4824 Room : c0 28b ------------------------------------------------------------
|
| | 9 answers | Add comment |
Monday, 12 February 2007
|
| need help handling access violation 0xC0000005 Parthasarathy Regupathy 14:24:10 |
| |
hi groups, when i compile the 'C' in VC++ working with inserting nodes, i get this error "Unhandled exception in insertingnodes.exe:0xC0000005:Access Violation." what shuld i do to handle this error and how can i rectify..
can anybody help me...
tanx regards with luv partha
------------------------ Yahoo! Groups Sponsor --------------------~--> Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar. Now with Pop-Up Blocker. Get it for free! http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/EbFolB/TM --------------------------------------------------------------------~->
|
| | 3 answer | Add comment |
Saturday, 27 January 2007
|
| Playing WAV files using C/C++ Wiz_mci 21:03:47 |
| | Does anyone know how one can play WAV files using C/C++ in linux?. Are there any libraries available? Any sample code out there?
To unsubscribe, send a blank message to <mailto:c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org>. Yahoo! Groups Links
<*> To visit your group on the web, go to: http://groups.yahoo.com/group/c-prog/
<*> Your email settings: Individual Email | Traditional
<*> To change settings online go to: http://groups.yahoo.com/group/c-prog/join (Yahoo! ID required)
<*> To change settings via email: mailto:c-prog-digest-hHKSG33TihhbjbujkaE4pw@public.gmane.org mailto:c-prog-fullfeatured-hHKSG33TihhbjbujkaE4pw@public.gmane.org
<*> To unsubscribe from this group, send an email to: c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org
<*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
|
| | 2 answer | Add comment |
|
| Windows/Linux GUI development library John Matthews 20:41:49 |
| | Hi- I'm currently looking at wxWidgets http://www.wxwidgets.org/ as a way of writing C/C++ GUI programs that will run under Linux and Windows. However, I'm open to alternative suggestions- does anyone know of anything better?
BTW the application I'm writing is a log file viewer. The current version is in C, and decodes and displays telecomms (WiMAX) equipment messages using indentation to aid interpretation eg.
message 1 first field of message 1 an array in message 1 1st item in array : message 2 etc.
In the past I've written this sort of thing just for Windows in Delphi and used a TreeView component to effectively replace the indentation eg. initially
+ message 1 + message 2
Click on + of message 1:
- message 1 first field of message 1 + an array in message 1 + message 2 etc.
I've 20+ years of embedded C experience, but not much C++ (yet), and no 'real' Windows programming experience (Delphi simplifies things), so the simpler the better.
Cheers John
To unsubscribe, send a blank message to <mailto:c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org>. Yahoo! Groups Links
<*> To visit your group on the web, go to: http://groups.yahoo.com/group/c-prog/
<*> Your email settings: Individual Email | Traditional
<*> To change settings online go to: http://groups.yahoo.com/group/c-prog/join (Yahoo! ID required)
<*> To change settings via email: mailto:c-prog-digest-hHKSG33TihhbjbujkaE4pw@public.gmane.org mailto:c-prog-fullfeatured-hHKSG33TihhbjbujkaE4pw@public.gmane.org
<*> To unsubscribe from this group, send an email to: c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org
<*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
|
| | 1 answer | Add comment |
|
| [ROOT] connecting signals & slots Roger Mason 20:11:51 |
| | Hello,
I need to connect a signal (from a TGButton "Fit") to a slot (something like DoFit()) passing a load of arguments. The arguments will need to consist of the starting parameters for the fit and, presumably, the TGraph containing the data to be fitted and the TF1 that represents the summ of the fit functions.
I have looked through the tests and tutorials but did not find an example close to what I need.
Thanks for any help,
Roger
|
| | 11 answers | Add comment |
|
| [ROOT] ACLiC: vector::iterator problem and "no plugin for TSystem" Dr. John Krane 00:15:45 |
| | Hi everyone,
Some of you might remember I had some trouble updating Root v4 to Root v5 some time ago. I had the poor judgement to copy my root binaries and libraries directly into /bin and /lib, and created an /include directory, which caused a world of trouble when it came time to update. (Since I had also defined $ROOTSYS and added it to associated PATHs, I really don't know what I was thinking copying over all those files.)
Anyway, I recently tried to update to v5 again and thought I was successful. I removed all the root files from /bin and /lib, removed /include, updated all my environmental variables, and was able to compile libraries that depend on Root, and also when I run Root the splash page says Root v5.14/00b, as does the welcome message in the terminal window. (In my earlier attemps, there was an obvious mismatch between the splash screen and the welcome message, showing me I was getting a mix of library versions.) I am able to use ACLiC to compile *most* code I want from within Root, but I am getting a strange failure today. I can only assume it is another v4 legacy on my end, but maybe not.
As you can see below, I'm getting a failure trying to ".L kRow.cpp+", complaining about my vector::iterator declaration, yet no problem reported by the compiler in the subsequent validity test. With the debug mode set to 5, I see "did not find plugin for class TSystem..." messages, but nothing more enlightening (to me). Does anybody know what my problem might be? I have looked at the ACLiC web page and found many cautions about using STL, but what I'm doing seems simple and worked in v4.
Here is my Root session, followed by the code in question:
* Version 5.14/00b 17 January 2007 * * * * You are welcome to visit our Web site * * http://root.cern.ch * * * *******************************************
FreeType Engine v2.1.9 used to render TrueType fonts. Compiled on 26 January 2007 for linux with thread support.
CINT/ROOT C/C++ Interpreter version 5.16.16, November 24, 2006 Type ? for help. Commands must be C++ statements. Enclose multiple statements between { }. root [0] gDebug =5; root [1] .L kRow.cpp+ Info in <TPluginManager::FindHandler>: did not find plugin for class TSystem and uri /data/kranelib/util/. Info in <TPluginManager::FindHandler>: did not find plugin for class TSystem and uri /data/kranelib/util/./kRow_cpp.so Info in <TUnixSystem::ACLiC>: creating shared library /data/kranelib/util/./kRow_cpp.so Info in <TPluginManager::FindHandler>: did not find plugin for class TSystem and uri /data/z_packages_and_software/rpm_by_hand/root/current/etc/system.rootmap Info in <ACLiC>: creating the dictionary files Info in <ACLiC>: rootcint --lib-list-prefix=/data/kranelib/util/./fileqDTxjTmap -f /data/kranelib/util/./fileaWohGY.cxx -c -p -I$ROOTSYS/include -I"/data/z_packages_and_software/rpm_by_hand/root/current/include" /data/kranelib/util/./kRow.cpp /data/kranelib/util/./file5yQHZVlinkdef.h Error: Symbol iteratorfield0 is not defined in current scope kRow.h:14: Warning: Error occurred during reading source files Warning: Error occurred during dictionary source generation !!!Removing /data/kranelib/util/./fileaWohGY.cxx /data/kranelib/util/./fileaWohGY.h !!! Error: rootcint: error loading headers... Error in <ACLiC>: Dictionary generation failed! Info in <ACLiC>: Invoking compiler to check macro's validity Info in <ACLiC>: g++ -c -O -pipe -Wall -W -Woverloaded-virtual -fPIC -Iinclude -pthread -I$ROOTSYS/include -I"/data/z_packages_and_software/rpm_by_hand/root/current/include" -I/data/kranelib/util/. -I/data/kranelib/util /data/kranelib/util/./kRow.cpp Info in <ACLiC>: The compiler has not found any problem with your macro. Probably your macro uses something rootcint can't parse. Check http://root.cern.ch/root/Cint.phtml?limitations for Cint's limitations. Info in <TPluginManager::FindHandler>: did not find plugin for class TSystem and uri /data/kranelib/util/./kRow.o Info in <TPluginManager::FindHandler>: did not find plugin for class TSystem and uri /data/kranelib/util/./fileaWohGY.cxx Info in <TPluginManager::FindHandler>: did not find plugin for class TSystem and uri /data/kranelib/util/./fileaWohGY.h Info in <TPluginManager::FindHandler>: did not find plugin for class TSystem and uri /data/kranelib/util/./fileaWohGY.o Info in <TPluginManager::FindHandler>: did not find plugin for class TSystem and uri /data/kranelib/util/./file5yQHZVlinkdef.h Info in <TPluginManager::FindHandler>: did not find plugin for class TSystem and uri /data/kranelib/util/./fileqDTxjTmap.in Info in <TPluginManager::FindHandler>: did not find plugin for class TSystem and uri /data/kranelib/util/./fileqDTxjTmap.out Info in <TPluginManager::FindHandler>: did not find plugin for class TSystem and uri /data/kranelib/util/./file5qRlmVcpp Info in <TPluginManager::FindHandler>: did not find plugin for class TSystem and uri /data/kranelib/util/./fileQ2NfpX root [2]
Here is the simple class that I was trying to compile, which worked under Root v4:
kRow.h ----------------------------------------------- #ifndef kRow_H #define kRow_H
#include <vector> #include "TString.h"
using std::vector;
class kRow {
private: vector<TString>::iterator field0;
public: kRow(vector<TString>::iterator p) {field0=p;} ~kRow() { }
void Close(Option_t *option=""){ option=0; } ULong_t GetFieldLength(Int_t field){ field=0; return 0; } // not implemented const char *GetField(Int_t field); const char *operator[](Int_t field) { return GetField(field); }
};
#endif
kRow.cpp ----------------------------------------------- #include "kRow.h"
const char *kRow::GetField(Int_t field){ return *(field0+field); }
|
| | 2 answer | Add comment |
Friday, 26 January 2007
|
| problem with boost::strong_components Tamas Marki 11:31:24 |
| | Hello, I'm trying to use the boost library's strong_components function to partition a graph to connected sub-partitions, and ran into a problem. Namely, when I generate the graph, for some reason the 'names' (indices) of the vertices have some gaps (basically the graph that needs to be partitioned is generated from another graph by throwing out a bunch of vertices). When I pass this graph to the function, it will count the left out vertices and treat them as 1-vertex sub-partitions, which is not desired. I then tried to use the vertex_index_map named parameter, that I thought would solve this. I used something like this (not the actual code as it would be too big)
std::vector<int> other; // fill up the vector with the vertices by pushing back each one. The number of vertices is about 170k and the biggest vertex index is about 260k. // .. // bigedges and bigweights have the edges and the weights, dim is the total number of vertices - all these are checked and proper.
graph_t cityg (bigedges.begin (), bigedges.end (), bigweights.begin (), dim); std::vector<int> component(num_vertices(cityg)); int num = strong_components(cityg, &component[0], boost::vertex_index_map (&other[0]));
I must be doing it wrong, since it segfaults. The documentation says "This maps each vertex to an integer in the range [0, num_vertices(g))", that's why I thought it would work this way, but it does not. The obvious solution would be to throw out 1-vertex partitions, but I'd really like to know what's the proper way of doing this. Thanks in advance for any help!
Tamas
-- Tamas Marki __._,_.___
To unsubscribe, send a blank message to <mailto:c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org>.
[IMAGE]
SPONSORED LINKS
C and c++ [http://groups.yahoo.com/gads;_ylc=X3oDMTJjdDUwOHQ2BF9TAzk3NDc2NTkwBF9wAzEEZ3JwSWQDMTAxMzEzOQRncnBzcElkAzE3MDUwMDY3ODgEc2VjA3NsbW9kBHN0aW1lAzExNjk3NDA0NDY-?t=ms&k=C+and+c++&w1=C+and+c++&w2=Computer+programming+languages&w3=Java+programming+language&w4=Basic+programming+language&w5=Programming+languages&c=5&s=141&g=0&.sig=rSEcR7B64_R_zU_FQFo8Yw]
Computer programming languages [http://groups.yahoo.com/gads;_ylc=X3oDMTJjMGN2aThsBF9TAzk3NDc2NTkwBF9wAzIEZ3JwSWQDMTAxMzEzOQRncnBzcElkAzE3MDUwMDY3ODgEc2VjA3NsbW9kBHN0aW1lAzExNjk3NDA0NDY-?t=ms&k=Computer+programming+languages&w1=C+and+c++&w2=Computer+programming+languages&w3=Java+programming+language&w4=Basic+programming+language&w5=Programming+languages&c=5&s=141&g=0&.sig=Vd_u-m2YOwh3rQSMWegmwA]
Java programming language [http://groups.yahoo.com/gads;_ylc=X3oDMTJjMHBqbDU1BF9TAzk3NDc2NTkwBF9wAzMEZ3JwSWQDMTAxMzEzOQRncnBzcElkAzE3MDUwMDY3ODgEc2VjA3NsbW9kBHN0aW1lAzExNjk3NDA0NDY-?t=ms&k=Java+programming+language&w1=C+and+c++&w2=Computer+programming+languages&w3=Java+programming+language&w4=Basic+programming+language&w5=Programming+languages&c=5&s=141&g=0&.sig=f1DTT2uu_E_QAECbDXxOfg]
Basic programming language [http://groups.yahoo.com/gads;_ylc=X3oDMTJjcGhyN3ZzBF9TAzk3NDc2NTkwBF9wAzQEZ3JwSWQDMTAxMzEzOQRncnBzcElkAzE3MDUwMDY3ODgEc2VjA3NsbW9kBHN0aW1lAzExNjk3NDA0NDY-?t=ms&k=Basic+programming+language&w1=C+and+c++&w2=Computer+programming+languages&w3=Java+programming+language&w4=Basic+programming+language&w5=Programming+languages&c=5&s=141&g=0&.sig=mV-_2bL0rNwDv9i32NUkQw]
Programming languages [http://groups.yahoo.com/gads;_ylc=X3oDMTJjODFsNzdyBF9TAzk3NDc2NTkwBF9wAzUEZ3JwSWQDMTAxMzEzOQRncnBzcElkAzE3MDUwMDY3ODgEc2VjA3NsbW9kBHN0aW1lAzExNjk3NDA0NDY-?t=ms&k=Programming+languages&w1=C+and+c++&w2=Computer+programming+languages&w3=Java+programming+language&w4=Basic+programming+language&w5=Programming+languages&c=5&s=141&g=0&.sig=JIolLBEyTuBhWnCNFXDJug]
Your email settings: Individual Email|Traditional Change settings via the Web [http://groups.yahoo.com/group/c-prog/join;_ylc=X3oDMTJmb29wZG5wBF9TAzk3NDc2NTkwBGdycElkAzEwMTMxMzkEZ3Jwc3BJZAMxNzA1MDA2Nzg4BHNlYwNmdHIEc2xrA3N0bmdzBHN0aW1lAzExNjk3NDA0NDY-] (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest [mailto:c-prog-digest-hHKSG33TihhbjbujkaE4pw@public.gmane.org?subject=Email Delivery: Digest] | Switch to Fully Featured [mailto:c-prog-fullfeatured-hHKSG33TihhbjbujkaE4pw@public.gmane.org?subject=Change Delivery Format: Fully Featured] Visit Your Group [http://groups.yahoo.com/group/c-prog;_ylc=X3oDMTJkaHN0YWI3BF9TAzk3NDc2NTkwBGdycElkAzEwMTMxMzkEZ3Jwc3BJZAMxNzA1MDA2Nzg4BHNlYwNmdHIEc2xrA2hwZgRzdGltZQMxMTY5NzQwNDQ2] | Yahoo! Groups Terms of Use [http://docs.yahoo.com/info/terms/] | Unsubscribe [mailto:c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org?subject=Unsubscribe]
__,_._,___
|
| | 2 answer | Add comment |
|
| Re: Huge memory model problem in 3.1 Bob Gonder 00:23:24 |
| | Z.K. wrote:
Now, I was able to compile the program using the huge memory model, >but now the com ports won't open. Did you check out the error codes? Which of the hundred or so methods do you use to "open the com ports"? Make sure the parameters are the correct size/type. (Show us the code)
If I remove some of the code and compile >using the large memory model as before, the com ports work just fine.>Anyone have any ideas on how to fix this? I beleive DGroup is the data group, not code, so reduce your data to fit in large model. Find large arrays, and allocate them at run time instead of compile time. Move larger arrays into their own C modules.
|
| | 4 answer | Add comment |
Thursday, 25 January 2007
|
| Re: Solution of b = ++a + ...... Brett W. McCoy 18:00:04 |
| | (Please don't send me private emails on this topic)
We have made this issue clear, regardless of the logic you are stepping through, there is no guarantee that all compilers will follow your logic. This is considered undefined behavior because it results in ambiguous side effects -- you are modifying the same variable several times through the same sequence point. Please refer to the FAQ link that was provided for a thorough and definitive explanation of this.
No one should be writing production code like this to begin with. If I found this kind of thing in a code review, you would be asked to rewrite it.
-- Brett
On 1/25/07, rajesh bisht <delhi_bisht-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> ----------------------------------------------------------------------------------------------------------Dear> Solution of u r problem :> solution :> 1 : b = ++a + a++ + a++ + a++; (Your problem).> Consider : I have mark red which have pre - increment operator> And Mark with Blue, which have post - increment operator.> Now, ++a = 2 (Only mention increment value with associate pre-operator> variables)> We have not any another pre-operator variable in the expression.> Now count total number of variables of the expression.> There is 4 .( 1 have pre-operator and 3 have post operator).> So. We have value of a =2.> There is 4 variables so Answer should be = 2 * 4 =8;> Let show another examples:>
A : b = ++a + ++a + a++ + a++> B : b = a++ + ++a + ++a + a++ + a++ ;> C: a++ + a++ + a++ + a++;> D : ++a + ++a + ++a;> Answer : A : There are 2 variable with pre-operator.> Such that ++a = 2, then ++a = 3;> Now current value of a = 3;> Total no of variables in the expression = 4;> So Answer = 3 * 4 = 12> Similar way For B: 2 varialbes with pre-operator.> So ++a = 2 then ++a = 3; (3 is last value of a by pre-operator)> No of variables = 5, so Answer = 5 * 3 = 15> Similar way : C : not any pre-ioperator so value not should be increment> So a = 1, no of variables = 3; Answer = 3*1 = 3.> Similar D : 3 variable with pre-operator.> So ++a =2; then ++a = 3;then ++a = 4;> Current value of a = 4 , no of varables = 3;> Answer = 3*4 = 12;> I hope now u will understood a well. See u again.> "Thanks & Regard's: Rajesh Bisht. - Delhi."> ----------------------------------------------------------------------------------------------------------> smartandkewl <idragosani-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Please do not send binary attachments> Dear find Attachement for the solution.> > Thanks : Rajesh Bisht> > "Brett W. McCoy" wrote: On 1/21/07,> ankurnot4u wrote:> > > this is some thing intresting !> > > can any one tell why the output of this code is 8 ??> > > {> > > int a=1,b;> > > b = ++a + a++ + a++ + a++;> > > cout<> > }> > You are invoking undefined behavior:> > ----------------------------------------------------------> > "In the rhythm of music a secret is hidden;> > If I were to divulge it, it would overturn the world."> > -- Jelaleddin Rumi> > well actually its simple.> > initially a=1> > b=++a + a++ + a++ + a++ ---->in this expression u first use a> pre-increment operator. so a becomes 2.> > now the calculation becomes b=2 + 2 + 2 +2 =8.> > the a++ in the remaining part is a post-increment operator.it is> only carried out after the expression is calc.> > hope u understood> > ---------------------------------> > Here s a new way to find what you're looking for - Yahoo! Answers> > ---------------------------------> > Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.> ________________________________> Need Mail bonding?> Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.>
-- ------------------------------------------------------------ "In the rhythm of music a secret is hidden; If I were to divulge it, it would overturn the world." -- Jelaleddin Rumi
To unsubscribe, send a blank message to <mailto:c-prog-unsubscribe@yahoogroups.com>. Yahoo! Groups Links
<*> To visit your group on the web, go to: http://groups.yahoo.com/group/c-prog/
<*> Your email settings: Individual Email | Traditional
<*> To change settings online go to: http://groups.yahoo.com/group/c-prog/join (Yahoo! ID required)
<*> To change settings via email: mailto:c-prog-digest-hHKSG33TihhbjbujkaE4pw@public.gmane.org mailto:c-prog-fullfeatured-hHKSG33TihhbjbujkaE4pw@public.gmane.org
<*> To unsubscribe from this group, send an email to: c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org
<*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
|
| | Add comment |
|
| [ROOT] get maximum & minimum x from TGraph Roger Mason 14:53:58 |
| | Hello,
Is there a way to get the maximum and minimum x values from a TGraph?
Thanks, Roger
|
| | 4 answer | Add comment |
|
| Crashing while releasing multi-dimensional array memory Sudheer Palaparambil 00:39:13 |
| | Hi,
The following piece of code is crashing in the main function. Any idea what is wrong with this code ? Please help. Thank you. Sudheer Palaparambil
// ------------------------------------- MySmartCard::MySmartCard() // ------------------------------------- { lMDASmartCardData = new String*[ ARRAY_ROWS ]; if ( lMDASmartCardData != NULL ) { lMDASmartCardData[ 0 ] = new String[ ARRAY_MASTER_COLUMNS ]; lMDASmartCardData[ 1 ] = new String[ ARRAY_MASTER_COLUMNS ]; lMDASmartCardData[ 2 ] = new String[ ARRAY_MASTER_COLUMNS ]; lMDASmartCardData[ 3 ] = new String[ ARRAY_MASTER_COLUMNS ]; lMDASmartCardData[ 4 ] = new String[ ARRAY_MASTER_COLUMNS ]; lMDASmartCardData[ 5 ] = new String[ ARRAY_MASTER_COLUMNS ]; for ( short lusRow = 6; lusRow < ARRAY_ROWS; lusRow++ ) { lMDASmartCardData[ lusRow ] = new String[ ARRAY_DETAIL_COLUMNS ]; } } }
//---------------------------------------- MySmartCard::~MySmartCard() //---------------------------------------- { for ( short lusRow = 0; lusRow < ARRAY_ROWS; lusRow++ ) { delete[] lMDASmartCardData[ lusRow ]; lMDASmartCardData[ lusRow ] = 0; } delete[] lMDASmartCardData; lMDASmartCardData = NULL; }
//------------------------------------------------- wxString **MySmartCard::GetArray() //------------------------------------------------- { return lMDASmartCardData; }
//------------------ main function() //------------------ { String **lMDASmartCardData = NULL; MySmartCard*customerSC = (MySmartCard *) NULL; customerSC = new MySmartCard(); customerSC->LoadArray();// Populates array. lMDASmartCardData = customerSC->GetArray(); .............. .............. delete customerSC; /* Here the application is crashing. */ /* Releases the memory. */ for ( short lusRow = 0; lusRows < lusRows; lusRow++ ) { delete[] lMDASmartCardData[ lusRow ]; lMDASmartCardData[ lusRow ] = 0; } delete[] lMDASmartCardData; lMDASmartCardData = NULL; return; }
___________________________________________________________ New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at the Yahoo! Mail Championships. Plus: play games and win prizes. http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk
To unsubscribe, send a blank message to <mailto:c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org>. Yahoo! Groups Links
<*> To visit your group on the web, go to: http://groups.yahoo.com/group/c-prog/
<*> Your email settings: Individual Email | Traditional
<*> To change settings online go to: http://groups.yahoo.com/group/c-prog/join (Yahoo! ID required)
<*> To change settings via email: mailto:c-prog-digest-hHKSG33TihhbjbujkaE4pw@public.gmane.org mailto:c-prog-fullfeatured-hHKSG33TihhbjbujkaE4pw@public.gmane.org
<*> To unsubscribe from this group, send an email to: c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org
<*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
|
| | 2 answer | Add comment |
Wednesday, 24 January 2007
|
| getopt() Rakesh V. 22:18:59 |
| | Hi frenz, Can anyone give complete description of getopt bye giving an example I am unable 2 understand it from man pages ......... Pleassssse
____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs
------------------------ Yahoo! Groups Sponsor --------------------~--> <font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12h689gaf/M=362131.6882499.7825260.1510227/D=groups/S=1705006788:TM/Y=YAHOO/EXP=1122902586/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org ">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life -Вbrought to you by One Economy</a>.</font> --------------------------------------------------------------------~->
|
| | 5 answers | Add comment |
|
| Can anyone tell why ? Ankurnot4u 21:58:09 |
| | this is some thing intresting !
can any one tell why the output of this code is 8 ??
{ int a=1,b; b = ++a + a++ + a++ + a++; cout<<b; }
To unsubscribe, send a blank message to <mailto:c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org>. Yahoo! Groups Links
<*> To visit your group on the web, go to: http://groups.yahoo.com/group/c-prog/
<*> Your email settings: Individual Email | Traditional
<*> To change settings online go to: http://groups.yahoo.com/group/c-prog/join (Yahoo! ID required)
<*> To change settings via email: mailto:c-prog-digest-hHKSG33TihhbjbujkaE4pw@public.gmane.org mailto:c-prog-fullfeatured-hHKSG33TihhbjbujkaE4pw@public.gmane.org
<*> To unsubscribe from this group, send an email to: c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org
<*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
|
| | 10 answers | Add comment |
|
| Linked list problem Sharique.Khan 21:08:44 |
| | Hey, I have a problem in linked list. I made a little database that stores name and secret number. But the problem is that when I want to save these data in any file so this data saves but real problem is to read data from a file. I had posted earlier this problem on this group.Hope I have reached to my answer. Plz solve my problems. Here is my code
#include <stdio.h> #include <conio.h> #include <stdlib.h>
#define TRUE 1
void newname(); void listall(); void rfile();
struct biodata{ char name[30]; int num; biodata *ptrnext; }; biodata *ptrfirst, *ptrthis, *ptrnew;
void main(void){
ptrfirst = (struct biodata *) NULL;
while(TRUE){ printf("\nPress 'e' for new entry.\n"); printf(" 'l' for list all.\n"); printf(" 'r' for read.\n"); printf(" 'q' for quit"); char ch; ch=getch(); switch(ch){ case 'e': newname();/*Enter new name*/ break;
case 'l': listall();/*List entire agents*/ break;
case 'r': rfile();/*Read data from file*/ break;
case 'q': exit(0); break; } } }
void newname(){
char numstr[15]; ptrnew = (struct biodata *) malloc (sizeof(biodata)); /*Gets memory space */
if(ptrfirst == (struct biodata *)NULL)/*if none already*/ ptrfirst = ptrthis = ptrnew;/*save address*/ /*not first item*/ else{/*go to end of list*/ ptrthis = ptrfirst;/*Start at begin*/ while(ptrthis->ptrnext != (struct biodata *)NULL ){ ptrthis = ptrthis->ptrnext; /*find next item*/ } ptrthis->ptrnext = ptrnew;/*point to new item*/ ptrthis = ptrnew;/*go to new item*/ } FILE *fptr; if( (fptr=fopen("E:/MS Visual Studio/link list/biodata.txt", "a")) == NULL) printf("Can't open File.");
printf("\nEnter name: "); gets(ptrthis->name); printf("Enter number: "); gets(numstr); ptrthis->num = atoi(numstr); fwrite(ptrthis, sizeof(biodata), 1, fptr); fclose(fptr); ptrthis->ptrnext = (struct biodata *) NULL; }
void listall(){
if(ptrfirst == (struct biodata *) NULL)/*if empty list*/ printf("\nList is Empty.");/*return*/
ptrthis = ptrfirst; /*start at first item*/ while(ptrthis != (struct biodata *) NULL){ /*print contents*/ printf("\nName: %s", ptrthis->name); printf("\nNumber: %03d\n", ptrthis->num); ptrthis = ptrthis->ptrnext;/*move to next item*/ }
}
void rfile(){
FILE *fptr;/*file ponter*/ if( (fptr=fopen("E:/MS Visual Studio/link list/biodata.txt","r")) == NULL) /*if returning NULL*/ printf("Can't open file");
while(fread(ptrthis, sizeof(biodata), 1, fptr) == 1){ /*item return or found*/ printf("\nName: %s", ptrthis->name); /*print contents*/ printf("\nNumber: %03d\n", ptrthis->num); ptrthis = ptrthis->ptrnext; } fclose(fptr); }
To unsubscribe, send a blank message to <mailto:c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org>. Yahoo! Groups Links
<*> To visit your group on the web, go to: http://groups.yahoo.com/group/c-prog/
<*> Your email settings: Individual Email | Traditional
<*> To change settings online go to: http://groups.yahoo.com/group/c-prog/join (Yahoo! ID required)
<*> To change settings via email: mailto:c-prog-digest-hHKSG33TihhbjbujkaE4pw@public.gmane.org mailto:c-prog-fullfeatured-hHKSG33TihhbjbujkaE4pw@public.gmane.org
<*> To unsubscribe from this group, send an email to: c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org
<*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
|
| | Add comment |
|
| attn: leola - really energetic keyword searchable - uv - (1/1) Millard 17:39:34 |
| | Hi everyone
Great prices and support await you as you travel into the beautiful world of premium nntp access. One thing I love about them, they don't keep log files of the news I read or files I download. Take a look at all the great features below and imagine! You'll LOVE it.
800 GIGS of new multimedia content each day Keyword searchable Blazing fast downloads Convenient thumbnail indexes Streaming audio and video
I'm really happy I found http://www.newsdude.net and you will love em too.
If i jap, kaj ri wor ut uy ow! I ek am isci jun zadhe cofba vi bingokosdal. Ter iy uznu i irsi infitesmin wuv nuzca lagpo. Si pajfopossuk vosso ug udgu! I ocjokovwof owfomayfub i maw ges hi uy, ascurustuh er giy, ti bok datdefikzaf ki nihko cefmovuklor up! Kow bi haplo vogki ji tah mehpo wi purvikatsem tunyalevgok zuhlo, pi citcajowket wov cenke mi cegpehihzok net hi uc elsocodhum urdu acpa! I ikyezozwid ufzolavnaw i udmu bog cakha bi nov, ud i biv en i ihbapehjag ek! I ifzo aj en ohmu ayzi, egpi oy ub i ufgu asjatemped i etpepincaw amwekulfec akva i omfobehbum, envusibyiw i op ap i icdi, iysu i oltumofkip iwni i at zil uw olwi i ugfo! Wir vi libfi uf bip si jawyo! Guztigijlic ratso wuyja ji rukhamuvpat sacfawudhil jijcu hig ci soztalipdog baynudumvan, jujzo bopme liy nehma fi wirfa, kujna vetre bi wehza diblojotfuw soyge az got dubgo av! I iwfuzuzhim ekyapucyul i oddadibken rug wihmi lag zet! Jobje af cod vi bulwesersad kihhu, ri od avti i arta ubtokapdec i bot aj rit jamsa. Ni ak enre poh hi firni kamverizzol um i aczo esmuviscuj. Vak ij muz cij ap ad acro, vup ip ir ejce i ilma ovza diz ji ow dos! Cuwya eb i ujke pud ki od. Ogmisanjum toc ud i asfipumhod ompozulvoc empe avsi ijdo, ap row ki um ocbu opgi ar igmi baw. Ih ibje agwi irba ewpe vin. Ek uflu os irgo! Adje ayhu avhe i apnu liy bi am olki enmi! Iwwa miy ji tecwivampez ok wey, puv behle ri sotmu ramza jat. Savro ki zezyerosbut vimhezotgar si gojziwebguv. Sidcumimrur ez ugke ol i pot sitli worno az! I efciculsog ay as i unfogiztac epwa. I og ivnucufbob dan, nufzi div wi us ubtepurgic i ombu is apji egna alfa! I ilhazigreb unwajubded ag iczu irbe i kej zocka botre uh! Ivzu dog vi ug izpeg ir. Daz vi rowwu bajhucupzun ray niyle wi bifgo wizdekacjet. Kek vun giz mos kirja wi didlu, piy gep fi goj him wupwa eb i eytewufpek evmirofnow. I icfohosjis udgojonlub voz ni sagsanemgel hegcu, uh afto of tur poj gipwe wi sehruboltem, am i abnigowguf avce urjo jaz ...
|
| | Add comment |
|
| Mixing printf and cout in C++. A Good or Bad Idea? Jaspreet Singh 15:35:41 |
| | Hi All
I guess its there in the C++ FAQs too but a small writeup :
http://cplus.about.com/b/a/000076.htm
Thanks!! and have a nice day!! Jaspreet
To unsubscribe, send a blank message to <mailto:c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org>. Yahoo! Groups Links
<*> To visit your group on the web, go to: http://groups.yahoo.com/group/c-prog/
<*> Your email settings: Individual Email | Traditional
<*> To change settings online go to: http://groups.yahoo.com/group/c-prog/join (Yahoo! ID required)
<*> To change settings via email: mailto:c-prog-digest-hHKSG33TihhbjbujkaE4pw@public.gmane.org mailto:c-prog-fullfeatured-hHKSG33TihhbjbujkaE4pw@public.gmane.org
<*> To unsubscribe from this group, send an email to: c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org
<*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
|
| | 1 answer | Add comment |
|
| Help ! if you can Jiou0962 08:36:20 |
| | Hi,
Followed my previous post, I want to sum up my question again.
How to pass a two D array as parameter into fuction when the first index of array need to be fixed ?
Please help if you can, much appreciated!
Yibin
To unsubscribe, send a blank message to <mailto:c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org>. Yahoo! Groups Links
<*> To visit your group on the web, go to: http://groups.yahoo.com/group/c-prog/
<*> Your email settings: Individual Email | Traditional
<*> To change settings online go to: http://groups.yahoo.com/group/c-prog/join (Yahoo! ID required)
<*> To change settings via email: mailto:c-prog-digest-hHKSG33TihhbjbujkaE4pw@public.gmane.org mailto:c-prog-fullfeatured-hHKSG33TihhbjbujkaE4pw@public.gmane.org
<*> To unsubscribe from this group, send an email to: c-prog-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org
<*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
|
| | 2 answer | Add comment |
|