473,553 Members | 2,934 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C / C++ Forum

C / C++ programming language - Get answers to questions about compilers, visual C++, templates, namespaces, classes, data structures, OOP (object-oriented programming), inheritance, data types, exceptions, Standard Template Library (STL) and the C Standard Library.
27
3,328
thread by: Paminu | last post Feb 13 '06 by: Kenny McCormack
I have a wierd problem. In my main function I print "test" as the first thing. But if I run the call to node_alloc AFTER the printf call I get a segmentation fault and test is not printed! #include <stdlib.h> #include <stdio.h> typedef struct _node_t {
11
1,913
thread by: benben | last post Feb 13 '06 by: Alf P. Steinbach
Recently I have come across a number of struct's that I think is quite interesting: typedef struct whatever_tag { int member1; char member2; // ... char last_member; // interesting line
5
1,505
thread by: ma740988 | last post Feb 13 '06 by: ma740988
I've got a struct which is comprised of POD types. I know in advance where in memory the struct resides. To make a long story short, I'm doing transfers of 16 bit ADC sampled data between 'cards'. At the front end I configure the memory such that - say card 1 will transfer data to card 2 at a specified region. A header is accompanied...
8
1,775
thread by: cppig1995 | last post Feb 12 '06 by: BobR
C++ is not only object-oriented language. I think the description of this group have to be changed. :-) Have fun! ---- cppig1995 (cppig1995@gmail.com) Daejeon Metropolitan City, Republic of Korea 11 years old in Western age.
11
3,574
thread by: aldrin | last post Feb 12 '06 by: Lew Pitcher
I'm trying to run this code under windows xp sp2 using codeblocks v1.0 compiler with great difficulty.There is no problem with running this under KDevelop in linux. Any help would be greatly appreciated. Enter an interesting string. Too many cooks spoil the broth Error opening C:\myfile.txt for writing. Program termnated. This...
5
2,216
thread by: Arno | last post Feb 12 '06 by: Daniel T.
Hello, here is my problem: I have a complex data type, like a std::vector< std::string > and need some global constant values of this type. The type is also used non-constant throughout the program, so I do not want to use dumb types, but rather STL things. In the best of worlds, initialization of these constants would not happen at...
16
2,305
thread by: sailor.gu | last post Feb 12 '06 by: Malcolm
Hi all guys, As an embeded programmer with five year C experience, I did read many great books related with design, coding, test,debug,algorithms, compiler, design, os, pm and others. I always dream to achieve a refined and reusable design and implementation. I am very interested with code reuse.
1
1,619
thread by: deepaknarula | last post Feb 12 '06 by: Flash Gordon
Bytes RAZOR The ONLINE C / C++ Programming challenge... If logic is your forte, programming your passion and winning your habit then we challenge you to Bytes RAZOR. Up for grabs is hard cash worth US$200 · Date: 13th February, 2006 · Venue: Your favorite box (Computer with Internet connection) · Location: http://www.dcetech.info/razor ·...
0
321
thread by: deepaknarula | last post Feb 12 '06 by: deepaknarula
Bytes RAZOR The ONLINE C / C++ Programming challenge... If logic is your forte, programming your passion and winning your habit then we challenge you to Bytes RAZOR. Up for grabs is hard cash worth US$200 · Date: 13th February, 2006 · Venue: Your favorite box (Computer with Internet connection) · Location: http://www.dcetech.info/razor ·...
5
2,640
thread by: C++Begginner | last post Feb 12 '06 by: red floyd
expected primary-expression before "else" I keep getting that error message, and after that it says (for the same line) expected ";" before "else" The problem is that I have the ; and it still keeps popping up as an error message when I try to compile it. Does anyone know what I should do?
4
2,552
thread by: B.D. | last post Feb 12 '06 by: B.D.
Can anyone explain way the transformation to upper case doesn't work correctly in the following code if PROBLEM is defined but works correctly if it's not defined? I'm using VC 7.1 #include <locale> #include <string> #include <algorithm>
1
1,778
thread by: deepaknarula | last post Feb 12 '06 by: Bob Hairgrove
Bytes RAZOR The ONLINE C / C++ Programming challenge... If logic is your forte, programming your passion and winning your habit then we challenge you to Bytes RAZOR. Up for grabs is hard cash worth US$200 · Date: 13th February, 2006 · Venue: Your favorite box (Computer with Internet connection)
3
1,465
thread by: Lilith | last post Feb 12 '06 by: Bob Hairgrove
If I have a class object and a pointer to the object is there a performance hit for invoking a member function using member of (.) vs member of (->) due to pointer arithmetic? From an amateur point of view I'd initially think that the pointer arithmetic would cause a slow down. On the other hand pointer arithmetic shouldn't even be an issue...
0
1,349
thread by: amit.azizi | last post Feb 12 '06 by: amit.azizi
hello how do i compile visual studio 6 project with intel C++ compiler from the command line thanks
2
2,050
thread by: bob | last post Feb 12 '06 by: Audison.Athena
how can I get the size of this 'buffer': FILE *filestream; filestream = fopen("testFile.txt", "r+"}; char *buffer; size_t count; fseek(filestream, 0, SEEK-END); count = ftell(filestream) + 1; rewind(filestream); buffer = (char*) malloc(count);
3
2,688
thread by: yogesh | last post Feb 12 '06 by: Kenny McCormack
I have compiled kernel 2.4.18 . I have followed the following sequence ... as make mrproper make xconfig make dep make make modules make modules_install then copied system.map and bzimage to boot directory..
7
2,858
thread by: Pedro Graca | last post Feb 12 '06 by: Keith Thompson
#include <stdio.h> #ifdef C99 #define FMT_STRING "The value is %zu.\n" #define CAST_SIZE_T #else #define FMT_STRING "The value is %lu.\n" #define CAST_SIZE_T (unsigned long) #endif
5
1,627
thread by: news.fe.internet.bosch.com | last post Feb 12 '06 by: those who know me have no need of my name
Hi , I wanted information about UTF16 format and what is disadvantage over UTF8 format.. TIA Mohan
8
25,158
thread by: vfunc | last post Feb 12 '06 by: vfunc
I have three files tbenbase.h, tbenbase.cpp and tbtst.cpp The class enmutable is forward declared in tbenbase.h and defined in tbenbase.cpp. This is within namespace tb in all files. The header is referenced at the top of tbtst.cpp outside of the namespace. the reference in tbtst.cpp is class eninv : public enmutable
2
1,630
thread by: bob | last post Feb 12 '06 by: Jack Klein
sorry to double, triple post but testFile.txt has 28 character (what editor says anyhow): "nothing here, see I'm empty" how can I get the size of this 'buffer': FILE *filestream; filestream = fopen("testFile.txt", "r+"}; char *buffer;
0
1,150
thread by: ma740988 | last post Feb 12 '06 by: ma740988
Given a composite type such that: struct tp2 { unsigned int val1; tp2 () : val1(0) {} };
0
296
thread by: bob | last post Feb 12 '06 by: bob
how can I get the size of this 'buffer': FILE *filestream; filestream = fopen("testFile.txt", "r+"}; char *buffer; size_t count; fseek(filestream, 0, SEEK-END); count = ftell(filestream) + 1; rewind(filestream); buffer = (char*) malloc(count);
1
1,732
thread by: electrixnow | last post Feb 12 '06 by: benben
I need some help on automation for office. I found some code I want to use, it looks like this: Variant wordTables = wordActiveDocument.OlePropertyGet( "Tables" ); long table_count = wordTables.OlePropertyGet( "count" ); There is more, it deals with OBJECTS. I have installed Visual C++ and the Platform SDK for VC++. it all was free. I...
4
3,028
thread by: satya | last post Feb 12 '06 by: Randy Howard
fork() does't return 2 vaule. it return only one vaule. on success it returns '0' and of failure it returns '--ve' value.
4
2,015
thread by: Schüle Daniel | last post Feb 12 '06 by: Schüle Daniel
Hello all, my question is basically wheather it's possible to have nested templates .. I mean the following if there are one templ. class and one global templ. function is it possible to specialize the function for say <int> but this for all possible classes (from class template) the code is here

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.