Search Results

Showing results 1 to 26 of 26
Search took 0.01 seconds.
Search: Posts Made By: Arne Kristoffer
Forum: C++ Sep 2nd, 2008
Replies: 1
Views: 926
Posted By Arne Kristoffer
Hey! :)

I found the functions in the chilkat-library usefull, so i downloaded it. If you havn't figured it out yet, I use the programming language C++ and i use the visual studio express IDE.
...
Forum: C++ Apr 16th, 2008
Replies: 7
Views: 508
Posted By Arne Kristoffer
Shouldn't the equal number be placed random, not on the side of each other? It's pretty easy to guess where the other 2 is if you have found the first.. :)
Forum: C++ Apr 16th, 2008
Replies: 12
Views: 2,431
Posted By Arne Kristoffer
This is bloody creepy! :)

I moved the file to \\..\\..\\..\\..\\..\\..\\..\\data

It worked. And, you were right, it stops at the erase-loop.

The reason why it stopped, was that i tried to...
Forum: C++ Apr 16th, 2008
Replies: 12
Views: 2,431
Posted By Arne Kristoffer
Well, the MyFile-object has so many details in it, so I can't see if it's opened, but this is the MyFile line in watch:



Since the program is located in "C:\Users\Arne\Documents\Visual Studio...
Forum: C++ Apr 16th, 2008
Replies: 7
Views: 508
Posted By Arne Kristoffer
I don't think I really understand. Is it? How could for example the array be?

Will the user enter the coordinates for the numbers they're targeting? So they could for example enter "1,4" and...
Forum: C++ Apr 16th, 2008
Replies: 12
Views: 2,431
Posted By Arne Kristoffer
Well, I used VC++ 2008 Express, and it compiles fine, and it don't crash.

What's strange, is that, if I add "cout << an;" in the start of the function, it prints an. But if I type it inside the...
Forum: C++ Apr 15th, 2008
Replies: 12
Views: 2,431
Posted By Arne Kristoffer
Okay, this is what I've done for now:
http://pastebin.com/m2aa328fb

1: It somehow works, but not as expected.
2: the info-vector (defined in main()) info[0] will allways be "empty".

Anyone?
Forum: C++ Apr 15th, 2008
Replies: 11
Views: 1,376
Posted By Arne Kristoffer
No problem! :)

I would recomend msdn.com, cppreference.com, cplusplus.com and first of all, google.

If you want to delete a file, google this:
"C++ delete file"
Forum: C++ Apr 15th, 2008
Replies: 11
Views: 1,376
Posted By Arne Kristoffer
It's because SYSTEMTIME is defined in Windows.h. Do you need the program to run in other operative systems?
Forum: C++ Apr 15th, 2008
Replies: 11
Views: 1,376
Posted By Arne Kristoffer
You don't need to include time.

You can delete files from for example C: with this:

system("Del \\..\\..\\asdfbaowgsbnlwergsfhgkldnh.sgasgraslk");

But why don't you use remove? I don't know...
Forum: C++ Apr 15th, 2008
Replies: 11
Views: 1,376
Posted By Arne Kristoffer
#include <stdio.h>
#include <Windows.h>
#include <iostream>
using namespace std;
int main()
{
SYSTEMTIME st;
GetSystemTime(&st);
cout << st.wDayOfWeek;
cin.get();
Forum: C++ Apr 15th, 2008
Replies: 12
Views: 2,431
Posted By Arne Kristoffer
Not even this would work!:


int main()
{
string *ptr = &getInfo("5656")[0];
cout << *ptr;
return 0;
}
Forum: C++ Apr 15th, 2008
Replies: 11
Views: 1,376
Posted By Arne Kristoffer
Well, without testing, I think this would give you the day:


#include <stdio.h>
#include <time.h>
int main()
{
SYSTEMTIME st;
GetSystemTime(&st);
return 0;
Forum: C++ Apr 15th, 2008
Replies: 12
Views: 2,431
Posted By Arne Kristoffer
Okay, I've changed the erasing part to this:

for (int x = 0; x != vec.size(); x++)
{
vec[x].erase(vec[x].length()-1);
vec[x].erase(0,1);

}

And it compiles.
Forum: C++ Apr 15th, 2008
Replies: 12
Views: 2,431
Posted By Arne Kristoffer
Thanks, but after changing:

str[i] to if (vectorOfInformation[iter][i] == ')')

And inserting vec.resize(5,"");

...it still doesn't work.
Forum: C++ Apr 15th, 2008
Replies: 12
Views: 2,431
Posted By Arne Kristoffer
Hi!

I have this function (well, it's pretty good explained in the code-tag, but okay.) which is supposed to see if a string is found first in a line in a text file. Anyway, this code gives the...
Forum: C++ Apr 9th, 2008
Replies: 1
Views: 442
Posted By Arne Kristoffer
Hello!

Is there any way that I could create a loop that will user the content from a text-file and the number of lines? I want to go through a file and look for something, and then I need to use...
Forum: C++ Apr 7th, 2008
Replies: 2
Views: 3,197
Posted By Arne Kristoffer
Forum: C++ Apr 7th, 2008
Replies: 2
Views: 3,197
Posted By Arne Kristoffer
Hello! :)

I'm having some trouble including header files in my project. This is my three files:

main.cpp:

#include <iostream>
#include <string>
#include "functions.h"
Forum: C++ Apr 4th, 2008
Replies: 9
Views: 919
Posted By Arne Kristoffer
Thank you very much for your help! :)

EDIT: Do anyone know how to delete the first and last character from a string?
Forum: C++ Apr 4th, 2008
Replies: 9
Views: 919
Posted By Arne Kristoffer
:)
When you ask in that way, I'm sure you're right, hehe, but I thought the first IF would "refuse" an ')' to continue.
Forum: C++ Apr 4th, 2008
Replies: 9
Views: 919
Posted By Arne Kristoffer
Why is the if (str[i] == ')') inside if (str[i] != '(' || str[i] != ')')?

A ')' won't slip through to the second if.
Forum: C++ Apr 4th, 2008
Replies: 9
Views: 919
Posted By Arne Kristoffer
Okay, thanks for answering, but how can i make the *PointerTOElement to point one element higher then?
Forum: C++ Apr 4th, 2008
Replies: 9
Views: 919
Posted By Arne Kristoffer
Hello!

I have a string which may look like this:
(arne kristoffer)(1231232)(12.12.12)(asdasdf 12)

This is just an silly example, but never mind.

THe point is that i need to seperate the...
Forum: C++ Apr 4th, 2008
Replies: 3
Views: 3,755
Posted By Arne Kristoffer
Thank you very much, this solved the problem! :)

Have a nice weekend!

Arne Kristoffer
Forum: C++ Apr 4th, 2008
Replies: 3
Views: 3,755
Posted By Arne Kristoffer
Hello! :)

I'm having a problem while comparing one character from a string with a ... string.

This is a part of a pretty complex loop (or, it's complex for me, since I'm new to C++ and...
Showing results 1 to 26 of 26

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC