15,300 Posted Topics

Member Avatar for Ancient Dragon

I hate the Office 2007 menu ribbon -- it is really awful and difficult to navigate such simple things as Open, Save, and Edit. Anyone know if there is a way to make the menus look like older versions of Office?

Member Avatar for Capt. Fantastic
0
64
Member Avatar for Nathaniel10

malloc(), calloc() and realloc() are C functions to allocate memory, although they can be used in C++ it is preferable to use the new operator. The two (malloc() and new) should not be used together in the same program. resize() is NOT a C or C++ function, but is often …

Member Avatar for Ancient Dragon
0
98
Member Avatar for arithehun

There is no such thing as c++ windows class in windows.h -- its all pure C code. There have probbly been in excess of 1,000 Microsoft programmers who wrote those win32 api functions.

Member Avatar for Ancient Dragon
0
98
Member Avatar for 0dark

What do you mean you want to change the stream to something else? What do you want to change it to?

Member Avatar for Ancient Dragon
0
231
Member Avatar for Orangeweapons

Join their mailing list and ask them. Nothing like getting the info straight from the horse's mouth ([URL="http://www.phrases.org.uk/meanings/336400.html"]American joke [/URL]- sorry if others don't understand it.)

Member Avatar for vijayan121
0
264
Member Avatar for Tellalca

Yes of course its possible. >>Can we treat these files as if they all are readable in binary mode? Yes, but you may not have permissions to do that. That is an operating systems problem, not C or C++. How to actually read those files is a different matter altogether. …

Member Avatar for Ancient Dragon
0
161
Member Avatar for danime

go to amazon.com and search for "web development" books. Also [URL="http://lmgtfy.com/?q=web+deveopment+tutorials"]look here[/URL] for tutorials

Member Avatar for Ancient Dragon
0
20
Member Avatar for BarnacleBoy

Do you know how to open a file and write to it? You can put the " character in the file by using the escape sequence \". [code] #include <fstream> using std::ofstream; int main() { char *string1[] = {"a1","a2","a3","a4"}; char *string2[] = {"b1","b2","b3","b4"}; ofstream out("filename.csv"); for(int i = 0; i …

Member Avatar for BarnacleBoy
0
78
Member Avatar for Web_Sailor

A technique I have used is to use another int array that represents the index values of the original array or vector. Sort the vector as normal but instead of swapping vector values you would swap the index array values. You could use std::sort() for this if sort the index …

Member Avatar for Ancient Dragon
0
101
Member Avatar for myk45

By itself it means absolutely nothing. In 16-bit compilers such as Turbo C it is sometimes necessary to hardcode memory addresses, such as the screen on MS-DOS is located at 0x8000 (or something like that). So it might be necessary to cast a pointer to that address [icode]char* screen = …

Member Avatar for myk45
0
97
Member Avatar for Jsplinter

The only time \\ is needed is for string literals, like one you posted because the compiler has to interpret each of the characters in the string literal. When the path is typed in from the keyboard of read from a file the \ does not have to be escaped …

Member Avatar for Jsplinter
0
280
Member Avatar for mjoshi

In the example line you posted, position 13 is the letter 'E', (in MET), not 'N'. And pos 24 is '1' (in 916).

Member Avatar for r.stiltskin
0
186
Member Avatar for USC_Megoy

what do you mean by "cursor base"? How to move the set the screen cursor (that blinking black line or square where you type)? That will depend on the operating system you are using.

Member Avatar for Martin B
0
131
Member Avatar for blessedboy123

Should be not very complicated. Just read the files in a loop [code] #include <string> #include <fstream> #include <sstream> int main() { std::ifstream in; for(int i = 1; <= 100; i++) { std::stringstream s; s << i; std::string filename = "a.out"; filename += s.str(); in.open(filename.c_str()); if( in.is_open() ) { std::string …

Member Avatar for mitrmkar
0
102
Member Avatar for SnowyCloud

I know it sounds fun to code it in assembly, but you would be better off using your time to learn a higher level language such as c, c++, c#, php, etc. There is almost no need for assembly programmers any more.

Member Avatar for mathematician
0
147
Member Avatar for heidik

Use <map> and you won't have to be concerned about duplicates. Or sort the vector first to make it easier to find duplicates. The operator< on line 20 will not work correctly because it will never reach the two lines that test for y (lines 24, 25 and 26 are …

Member Avatar for heidik
0
112
Member Avatar for halil.burak

Nice instructions -- but what do you want to know about them? I hope you don't want anyone to write the program for you because we don't do that.

Member Avatar for halil.burak
0
149
Member Avatar for awesome3000

First -- thanks for using code tags correctly on your first post here. Nice code, but why did you post it?

Member Avatar for Ancient Dragon
0
134
Member Avatar for OneRunner

>>if (choice3=='89') '89' is not 'Y'. There is no such thing as 89 within single quotes. Your compiler should have given you an error or warning on that, which I have to assume you ignored. [icode]if(choice3 == 'Y')[/icode] is what you want. But what if you type 'y' instead of …

Member Avatar for doolali
0
121
Member Avatar for awesome3000

>> how can i delete the previous lines in the file and write a new lines You will have to rewrite the entire file. It's not possible to insert new lines somewhere in the middle of a text file without rewriting it. You already have the vector, so just interate …

Member Avatar for Ancient Dragon
0
74
Member Avatar for Bigbrain99

First you have to declare an object of type FLATMATE and then push it onto the vector [code] FLATMATE fl("John"); myvector.push_back(fl); [/code]

Member Avatar for Bigbrain99
0
104
Member Avatar for eme21

sorted lists means the items are in alphabetical or numeric order, unsorted means they are in just some random order.

Member Avatar for LevyDee
0
77
Member Avatar for rramyaasmi
Member Avatar for rramyaasmi
0
243
Member Avatar for jmt627

In alloc_vec(), new_vector_ptr is just an uninitialized and unallocated pointer that points to some random memory location. You have to allocate memory for it before it can be used for anything. [code] Vector *alloc_vec(void) { Vector *vector_ptr = new Vector; // <<<<<< Here vector_ptr->size = 0; vector_ptr->array = NULL; vector_ptr->array …

Member Avatar for Ancient Dragon
0
113
Member Avatar for user543820

don't use a loop. [URL="http://faydoc.tripod.com/cpu/stosb.htm"]See this link[/URL] [code] mov ecx,4096 mov edi,offset ??? xor eax,eax ; set eax = 0 rep stosb [/code] You can inprove the performance of that a tiny bit by using stosd and storing in ecx the count of dwords instead of bytes

Member Avatar for NotNull
0
141
Member Avatar for Rushix

In USA you can copyright software simply by putting copyright statement at the top of the source code (in comments of course). I don't know a thing about India.

Member Avatar for Ancient Dragon
0
55
Member Avatar for Bozog

How do you recognize one paragraph from another? There is no standard way to separate paragraphs like there is to separate lines. So your first task is to clearly define what constitutes a paragraph. Counting the number of '\n's is counting lines, not paragraphs. So you will have to think …

Member Avatar for Martin B
0
1K
Member Avatar for Intrade

VB can not call the methods that take c++ classes as parameters or return values, such as std::string. And VB will have to call the methods by their mangled names as generated by the c++ compiler.

Member Avatar for Ancient Dragon
0
263
Member Avatar for hveed

Pass by reference allows one function to change the value of a variable that is declared in another function. For example, put the following into your compiler, compile and run it. Then you will see how pass by reference works. More in-depts explaination is [URL="http://cplus.about.com/od/learning1/ss/references.htm"]here[/URL]. [code] #include <iostream> void foo(int& …

Member Avatar for Ancient Dragon
0
138
Member Avatar for burcin erek

If you wrote the program as MS-Windows GUI, such as it uses WinMain() instead of main(), then that link error tells me that you created the wrong kind of project. You should have started with a Win32 Project, not a Win32 Console Application (assuming your compiler is VC++ 2010).

Member Avatar for burcin erek
0
113
Member Avatar for waynew
Member Avatar for Ancient Dragon
0
119
Member Avatar for brendono978

A c++ vector is just the c++ implementation of a normal array. So when the instructions tell you there are exactly 8 floating point values in the vector, that means declare an array like this: [icode]float values[8];[/icode] If you are confused about how to use arrays then read one of …

Member Avatar for brendono978
0
197
Member Avatar for Anuradha Mandal

Each node in the linked list will contain the information for one student. First create a structure with all the information you want about a student then add a next pointer for the linked list. If you need more information then you will have to be a lot more specific …

Member Avatar for Ancient Dragon
0
69
Member Avatar for yesamin

To add a node at the end of the linked list the function will have to start at the head and iterate until it finds the last node -- which will be the node where the next pointer is NULL (or 0). Once that node is found just set the …

Member Avatar for Ancient Dragon
0
62
Member Avatar for spacechase0

>>'Clean All Targets' (which I think is a complete rebuild?). No it doesn't mean that. Clean means to just delete all the files that are generated by the compiler, such as *.obj, *.o, *.lib, *.dll, *.pch, etc.

Member Avatar for spacechase0
0
140
Member Avatar for nnlink
Member Avatar for nnlink
0
112
Member Avatar for Glass_Joe

As a retired 23 year veteran I have to agree that the game should be banned from every store in the USA. The game is an insult to every American who died in wartime. If I see a copy of it I'm afraid I will have to burn it in …

Member Avatar for kes166
0
903
Member Avatar for moonL!ght

We can't help you if you don't post the code. And tell us the exact error message -- what unresolved symnbol? You will get that if you put a method in a class but not the method's implementation code.

Member Avatar for muze
0
89
Member Avatar for muze

Create a new project then copy (with Windows Explorer) the *.cpp and *.h files from the other two files into it. Then in the Solution Explorer window of VC++ 2010 right click "Source Files" and from the popup menu select Add --> Existing Item. Or, if I misunderstood what you …

Member Avatar for Ancient Dragon
0
103
Member Avatar for j.shakthiyokesh

I down voted you just because of the crazy/childish title you gave this thead. Otherwise what can I say except that the code you posted is horribly formatted. On positive note -- you used code tags correctly on your very first post :) I would probably have up reped you …

Member Avatar for mfaisalm
-2
207
Member Avatar for bgriffith

Just because entries has room for 20 items don't assume that all items were used. What happens to that sort algorithm is only 2 items were actually used? You need another counter to keep track of the number of items actually used in that array. Then that sort() function will …

Member Avatar for group256
0
127
Member Avatar for n0de

you can not use sizeof to get the number of bytes allocated to an array. All sizeof(any pointer here) does is give you the size of a pointer -- on 32-bit compilers it will be 4. There are two solutions I can think of: 1. Use vector instead of array, …

Member Avatar for n0de
0
7K
Member Avatar for Master Rattley
Member Avatar for Master Rattley
0
60
Member Avatar for dylank

You are using VC++ 2010 on MS-Windows but attempting to run a *nix ls command???? On MS-Windows the equivalent of ls is dir. >>strcat(ps,psBuffer); You will have to initialize ps to 0 before that line. Do it when it is declared, [icode]char ps[1024] = {0};[/icode] I think it would be …

Member Avatar for NicAx64
0
686
Member Avatar for demigodz24

It is initializing each array element with random numbers between the two values you see.

Member Avatar for dylank
0
122
Member Avatar for abhii

[URL="http://lmgtfy.com/?q=c%2B%2B+sort+algorithms"]Link[/URL] >>plz let me find a simple code Bubble sort algorithm is as simple as it gets when you have to write your own algorithm. Otherwise you can just use std::sort() that's found in <algorithm> header file.

Member Avatar for Ancient Dragon
0
262
Member Avatar for mybluehair

How to erase the screen is operating system dependent. The simplest way to do it is [icode]system("cls");[/icode] or for *nix [icode]syte("clear");[/icode] But both those are not recommended because they can intoduce your program to hackets.

Member Avatar for Master Rattley
0
138
Member Avatar for swapnaoe

Its all about something called the "comma operator" [URL="http://en.wikipedia.org/wiki/Comma_operator"]Here[/URL] and [URL="http://msdn.microsoft.com/en-us/library/zs06xbxh(VS.80).aspx"]Here[/URL] are two more links

Member Avatar for Ancient Dragon
0
87
Member Avatar for sonsofliberty84

>>would prefer it to be standard C++ not visual studio C++ VC++ is a compiler, not a language. [code] #include <windows.h> int main() { HWND hWnd = GetConsoleWindow(); ShowWindow(hWnd, SW_MINIMIZE); // rest of program goes here [/code]

Member Avatar for Ancient Dragon
0
292
Member Avatar for n0de

Please post the first few lines of the csv file so we have something with which to test your program.

Member Avatar for n0de
0
243

The End.