15,300 Posted Topics

Member Avatar for eltoy
Member Avatar for p.h.p
0
125
Member Avatar for glao

>The second isn't being increased by 4 bytes from the ptr. Yes it is. 945c + 4 = 9460 (5c+1=5d, 5d+1=5e, 5e+1=5f, 5f+1=60)

Member Avatar for glao
0
187
Member Avatar for SerenityG

you also need to replace iostream with stdio.h, add .h extension to the other includes, delete like 4, and replace cout with printf()

Member Avatar for David W
0
234
Member Avatar for Razahcy
Member Avatar for smdjilani

They do not both work the same. calloc() initialized the memory block with all 0's while malloc() does not. And they do not have the same parameters.

Member Avatar for naveen1993
0
180
Member Avatar for sparky58

It's just a simple inline method, or you can put the implementation code in the \*.cpp file if you wish. class SavingsAccount { public: friend ofstream& operator<<(ofstream& out, SavingsAccount& obj); friend istream& operator>>(istream& cin, SavingsAccount& obj); public: string firstName; string lastName; float savingBalance; float annualInterestRate; int objectnumber; void operator+=(int val) …

Member Avatar for Banfa
0
401
Member Avatar for michelemalta

remove the word **typedef**. I hope you realize that will create a non-null-terminated array of characters. You can't pass it to any of the functions in string.h. A better and easier way to declare it is like this: `char alphabet[] = "abcdefghijklmnopqrstuvwxyz";`

Member Avatar for nullptr
0
295
Member Avatar for help distressed

My PC has a lot of external devices connected to it, I don't see how a tablet could possibly do that. The tablet I have has only one port -- to tether to a PC or recharger.

Member Avatar for Ancient Dragon
0
501
Member Avatar for daniel1977

>Do I need a header file and a .cpp file both to use a custom defined class? Depends on the how complex the class is. In the simplest case the class and implementation can both be in the header file. I like to use inline for very short methods. For …

Member Avatar for rubberman
0
161
Member Avatar for rory.starkweather.7

That explains a great deal :) You are using Turbo C because you are a hobyist, not a student who is forced to use it by his/her university. Sorry, but I can't help you either because I havn't used it since about 1987 myself. If you are still trying to …

Member Avatar for jwenting
0
382
Member Avatar for GliderPilot

I'm using IE11 and I see that but in a circle, it's a square like you showed in the member's Profile page. It looks like that on Chrome too. My guess is that's the way it's supposed to be.

Member Avatar for diafol
0
271
Member Avatar for rory.starkweather.7

Where did you get that algorithm? [Here'](http://cforbeginners.com/ssort.html)s another for you to study.

Member Avatar for rory.starkweather.7
0
277
Member Avatar for ckide

depends on data type sUserName -- string iUserID -- integer I don't write php or java, just c and c++.

Member Avatar for Ancient Dragon
0
308
Member Avatar for Prashant_4

typecasting doesn't work. You use the macro toupper() on each character in the string (use a loop) Example char c = 'a'; c = toupper(c); // convert to upper-case printf("%c\n", c);

Member Avatar for naveen1993
0
238
Member Avatar for COKEDUDE

calloc is the same as malloc but calloc initializes the memory to all 0s Both these are the same int *array = malloc(10 * sizeof(int)); for(int i = 0; i < 10; i++) array[i] = 0; The above can be rewritten with this one line: int *array = calloc(10, sizeof(int));

Member Avatar for deceptikon
0
350
Member Avatar for Subhasis giri

line 5 is undefined behavor, the value printed for i may be difference from one compiler to the next.

Member Avatar for deceptikon
0
115
Member Avatar for Totoo
Re: java

Is that supposed to be written in java or c++? There is a java form for such questions. In either event, no one here will do your homework for you. Post the code you have written and ask questions about what you don't understand. It is YOUR responsibility to do …

Member Avatar for Ancient Dragon
0
273
Member Avatar for Tcll

The only program I miss from XP is the original version of [Diablo RPG](http://en.wikipedia.org/wiki/Diablo_(series)). There are several MS-DOS games I liked. Otherwise, I don't miss a thing from XP.

Member Avatar for Ancient Dragon
0
377
Member Avatar for DeepKiran

ListBox has a FindString() method. When you enter text in the textbox, pass the text on to ListBox.FindString(). If you need anything more complex searching then that, I'm afraid you will have to do the work yourself as deceptikon said.

Member Avatar for DeepKiran
0
207
Member Avatar for sparky58

Use a friend method to overload those operators, for example #include <iostream> #include <fstream> using namespace std; class SavingsAccount { public: friend ofstream& operator<<(ofstream& out, SavingsAccount& obj); public: string firstName; string lastName; float savingBalance; float annualInterestRate; int objectnumber; ... ... }; ofstream& operator<<(ofstream& out, SavingsAccount& obj) { out << obj.firstName …

Member Avatar for Ancient Dragon
0
290
Member Avatar for ravi_14

>first line is pointer to an array of 5 integers Those are char pointers, not integers. The first line declares an array of unknown number of pointers, each pointer points to a memory block of 5 bytes. The second line allocates a single block of memory with size n*5. This …

Member Avatar for Ancient Dragon
0
293
Member Avatar for adhirgukt

And if you use QT compiler you can have one set of source code for both \*nix and Windows, AFAIK you won't have to rewrite anything to change from one os to the other, just recompile.

Member Avatar for Banfa
0
254
Member Avatar for Stefan_2

Post the code you have written so that we can see where your "issues" are.

Member Avatar for Stefan_2
0
288
Member Avatar for babiiros

objects can't be declared in case statements without { and }, for example: switch(choice) { case 1: { ifstream levelOne; levelOne.open("level1.txt"); } break; That also means that the stream will be closed as soon as the break statement is executed and the switch is exited. I think you need to …

Member Avatar for Ancient Dragon
0
404
Member Avatar for pittdaniweb

Any first year C programming student should be able to answer that question. If you could not then you are not yet ready to work as a professional programmer.

Member Avatar for rajii93
0
814
Member Avatar for Hector_2

The problem appears to be in this function `ListNode *LinkedList::insert(ListNode *item, ListNode *sortedList)` That function is destroying the original list. It should be inserting item into SortedList and returning SortedList. Instead, it is doing just the opposite. One way to solve the problem is for insert() to create a new …

Member Avatar for Hector_2
0
196
Member Avatar for rubeea.jaffari

Your options are somewhat limited, but [here ](http://www.easysoft.com/developer/languages/c/odbc_tutorial.html)is an ODBC tutorial

Member Avatar for rubeea.jaffari
0
615
Member Avatar for waqarulsalam

Good. Now get a college bachelor's degree and you will be on your way.

Member Avatar for Bob Hensley
0
92
Member Avatar for IT seeker

[QUOTE=IT seeker;1083064]what is the code of ms office in c++??//[/QUOTE] Send Microsoft a Billion dollars USD and they MIGHT let you see it.

Member Avatar for waqarulsalam
-3
178
Member Avatar for kamalashraf

The metod that starts on line 92 is a copy constructure, which means you have to create a copy of the contents of the parameter. In this case you have to copy the contents of the list from **other** parameter into **this**. A simple one-line statement is not sufficient.

Member Avatar for Ancient Dragon
0
155
Member Avatar for seankleyn

[QUOTE=jbennet;334294]rofl i disklike c++ myself, but i appreciate its importance they should make a better c++ and call it D that would be cool (and yes ive tried c# and c++.net and dislike them also)[/QUOTE] They'd have to call it E or something else because there already is a D …

Member Avatar for keyboard_me
1
2K
Member Avatar for colper89

The constructor needs to duplicate the items in the parameter. Iterate through each of the shapes in list parameter and call list2.Add() method to add the shape to list2. Since you have already coded other functions that iterate through all the shapes this constructor should not be all that difficult …

Member Avatar for colper89
0
177
Member Avatar for moaz.amin.37
Member Avatar for Dang_1

what compiler are you using? Turbo C has a goto() function that moves the cursor somewhere then you would just print spaces. If you are using a more modern compiler then you will have to use some of the win32 api console functions to move the cursor to the beginning …

Member Avatar for Ancient Dragon
0
106
Member Avatar for minitauros

You could sleep in a motel or hotel, but at $200/day that would cost you $3600.00 USD. Campervans get terrible gas milage, gas costs about $3.60/gallon. Get a Toyota Prius which gets about 52 miles/gallon (I own one and is one of my favorite cars). Next make sure you dress …

Member Avatar for Stuugie
0
652
Member Avatar for moaz.amin.37

For char arrays you can use strcmp() which is defined in string.h to check if the two character arrays are the same or not. strcmp() returns 0 if the two are identical. `if( strcmp(str,"hello") == 0) cout<<"world";`

Member Avatar for Ancient Dragon
0
324
Member Avatar for steven8579

I think the problem is line 36. freenode is the new node to add to the head of the linked list. all you have to do is this: freenode->next = top; top = freenode; line 45: you need a `break` statement before the next case. line 11: main() always always, …

Member Avatar for Ancient Dragon
0
230
Member Avatar for Ancient Dragon

After the time has expired to edit a post can you just remove the Edit Post button? It's somewhat confusing to make changes then no Save button.

Member Avatar for Ancient Dragon
0
158
Member Avatar for razylovesyou

You mean you wanted until the day before the assignment is due to get started?? Good luck.

Member Avatar for ddanbe
0
262
Member Avatar for MARKAND911

the clipboard is the operating system (Windows) way to copy/paste. You can copy from one process and paste it in the same or another process. Similar concept to shared memory in linux os but not nearly as versatile.

Member Avatar for Ancient Dragon
0
130
Member Avatar for Kopals

try [this](http://www.infolet.org/2012/10/how-to-get-turbo-cc-in-full-screen-on.html)

Member Avatar for Kopals
0
135
Member Avatar for TheFearful

Move the include statement down below to line 4, after the ifdef statement. Yes, you can put include statements in header files, it's done all the time.

Member Avatar for Kristian_2
0
206
Member Avatar for samson.dadson.3

You don't compile each module down to \*.exe, but instead just to object module then use the linker to link both object modules together at the same time. And you should be creating a console project, not a Windows project. The error you posted indicates you created the wrong kind …

Member Avatar for samson.dadson.3
0
431
Member Avatar for naveen1993
Member Avatar for mrkm1188
Member Avatar for m.a.u.

Read [this page](http://sourceforge.net/apps/trac/libusb-win32/wiki), which is a windows port of the library. Since you are already using it in Ubuntu you should have little or no difficulty using it in Windows. As for VS2010, there is nothing different about it than there is about using any other 3d party library. It's …

Member Avatar for m.a.u.
0
1K
Member Avatar for ravi_14

Post your code, the diagram you posted is not very helpful to find the problem in your program. My guess is that the pointer you used was not initialized to a specific address before dereferencing it. For example int k = 123; // original integer int* p = &k; // …

Member Avatar for Ancient Dragon
0
169
Member Avatar for limitx3m

I don't think some of that came out right -- what is �$� ?

Member Avatar for Ancient Dragon
0
294
Member Avatar for m.a.u.

They are correct -- you can't duel boot both. But you can use a [VirtualBox](http://www.oracle.com/technetwork/server-storage/virtualbox/downloads/index.html?ssSourceSiteId=otnjp) and install it there.

Member Avatar for m.a.u.
0
314
Member Avatar for neeraj_shri

You can't. You need a 32-bit or 64-bit compiler to do that. Turbo C++ is just too old

Member Avatar for rubberman
0
88

The End.